willpower Posted August 22, 2006 Share Posted August 22, 2006 HiImagine that the user logs in with username and password and this is checked for validity in 'check_user.php'. Once vaildated this file stores the data in $_SESSION['user']=$username and redirects the user back to the referring page.If the session in set/registered the referring page now displays the users shopping cart. and log on message " You are logged in as $SESSION['user'];With me so far.This all works...wey hey.But when I refresh this page or navigate to another....gues what happens.NO they arent asked to log in again....but the displayed username (the session var) changes from the username to "0"WHY..... I can post code but as there is a lot I wondered if anyone has had a similar issue first or can give me some poinetsr to check.session_start() is included in all files.why would it change on a page refresh?thanks WillWhen validated an include 'shopping Quote Link to comment Share on other sites More sharing options...
willpower Posted August 22, 2006 Author Share Posted August 22, 2006 Well I don't know exactly what happened....butI fixed it. I renamed all the session vars and that cleared up my issue. Apparently something to do with session value leakage in var names.dont askWill Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.