Session Values Not Retained in IE
Posted: Mon May 14, 2007 9:45 am
Hi
i've just started to get this weird error with sessions in internet explorer. Some aren't being retained. I've tried to break it down to its simplist.
At the end off my log in page i printo out these session values
and they print out fine like so
User : admin
Level : 0
however at the beginning off the next page i use the code
and i get the print out
User1 :
Level1 :
the strangest thing is if i set a new session value at the bottom of my login page like
only that will be displayed on the next page using this code
User :
Level :
Test : test
And to make things worse it only happens in IE 6 and IE 7 it works fine in Firefox and i also in ZZEE Script GUI which i use on my machine for testing.
i also have other websites on the same server running with sessions working fine in IE it strange this just started happening on this page.
If anyone knows a reason why IE might do this i would be greatful to hear any input.
Note
I have made sure there are no illegal characters in the url as i here this can stop session working in IE
Thanks to anyone who might be able to help
Nigel
i've just started to get this weird error with sessions in internet explorer. Some aren't being retained. I've tried to break it down to its simplist.
At the end off my log in page i printo out these session values
Code: Select all
echo "User : ".$_SESSION["username"]."<br>";
echo "Level : ".$_SESSION["userlevel"]."<br>";User : admin
Level : 0
however at the beginning off the next page i use the code
Code: Select all
session_start();
echo "User : ".$_SESSION["username"]."<br>";
echo "Level : ".$_SESSION["userlevel"]."<br>";User1 :
Level1 :
the strangest thing is if i set a new session value at the bottom of my login page like
Code: Select all
echo "User : ".$_SESSION["username"]."<br>";
echo "Level : ".$_SESSION["userlevel"]."<br>";
$_SESSION["test"] = "test";Code: Select all
echo "User : ".$_SESSION["username"]."<br>";
echo "Level : ".$_SESSION["userlevel"]."<br>";
echo "Test : ".$_SESSION["test"]."<br>";Level :
Test : test
And to make things worse it only happens in IE 6 and IE 7 it works fine in Firefox and i also in ZZEE Script GUI which i use on my machine for testing.
i also have other websites on the same server running with sessions working fine in IE it strange this just started happening on this page.
If anyone knows a reason why IE might do this i would be greatful to hear any input.
Note
I have made sure there are no illegal characters in the url as i here this can stop session working in IE
Thanks to anyone who might be able to help
Nigel