Jump to content

session variables getting reset


jsalita

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.