problems with PHP SESSION

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
geodet
Forum Newbie
Posts: 2
Joined: Mon Nov 20, 2006 10:18 am

problems with PHP SESSION

Post 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]
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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?
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

When you say works, what do you mean?
Post Reply