Page 1 of 1

problems with PHP SESSION

Posted: Mon Nov 20, 2006 11:53 am
by geodet
feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


can you please tell me why php session works on Firefox, but it doesn't on IE?

Code: Select all

<?

session_start();
$file=include('usernames.php');
$user=explode("\n", $file);
foreach($user as $ime){
$part=explode(":", $ime);
$part[0] = strtoupper($part[0]);
$username = strtoupper($username);
if ($part[0] == $username && $part[1] == $password && $part[0] != ""){
$_SESSION['ulaz'] = $username;
if ($part[6] != "aktivirano"){
?>
<center>
<form method="post" action="add.php">
Napi&#1681;i eljeni password*:<br /> <input type="password" name="pass" size="25" />
<br />
Ponovi eljeni password*:<br /> <input type="password" name="pass_check" size="25" />
<br />
<br /><input class="button" type="submit" value="Promjeni" /></form>


<?
exit;
}

}


}
*/
?>

feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]

Posted: Mon Nov 20, 2006 3:10 pm
by feyd
It's pretty difficult to answer your questions without knowing more specifics. Are you sessions set to use cookies, and only cookies? Are you sure the session data is being set?

Posted: Mon Nov 20, 2006 3:53 pm
by RobertGonzalez
When you say works, what do you mean?