Page 1 of 1

[SOLVED] problem with session

Posted: Thu Mar 24, 2005 12:57 pm
by santo_hiu
hi all,
i have a form, on submit it takes an array of items id to be compared, then it goes to compare.php.
from there, the only link is to hit the go back button.
however if i do that, i lost my username session. well, not totally lost, but the username become truncated.
hence, i need to log out and re-login.
can anyone help?

Posted: Thu Mar 24, 2005 2:04 pm
by feyd
care to post your code? (make sure to read the posting code guidelines.)

Posted: Thu Mar 24, 2005 2:07 pm
by Joe
Sounds to me as if you have appended a new value on top of the existing session. Please post your code.

Posted: Sun Mar 27, 2005 8:55 pm
by santo_hiu
yes indeed...

in the login page, i used --> $_SESSION['username']=$username;

then in the compare page, i redefined $username=$row['username'];
i think somehow, it conflicted.
I change the name in the compare page into $uname=$row['username'];

and it went perfectly fine now..
thanks for the help.