jsalita Posted April 14, 2009 Share Posted April 14, 2009 In a site I'm working on, I have a session variable that keeps track of the page that's currently being viewed. It's mainly so that a user will be returned to that page after logging in. However, there are certain pages that seem to lose this value when they get to the login page. For example: I have a.php, b.php and c.php. Each sets $_SESSION['location'] to their filename. If I print out the session variable at the end of each file, I get a.php, b.php and c.php, respectively. When I go to login.php from any of those pages and print out $_SESSION['location'], a and b will print out properly but c prints out index.php. Can anyone tell me why? Link to comment https://forums.phpfreaks.com/topic/153956-session-variables-getting-reset/ Share on other sites More sharing options...
kenrbnsn Posted April 14, 2009 Share Posted April 14, 2009 Please post your code. Without it, we would just be guessing as to the cause of your problem. Ken Link to comment https://forums.phpfreaks.com/topic/153956-session-variables-getting-reset/#findComment-809152 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.