Re: Overriding session length in existing session?

From: Date: Tue, 08 Mar 2011 20:00:59 +0000
Subject: Re: Overriding session length in existing session?
References: 1 2 3 4 5 6  Groups: php.general php.general 
Request: Send a blank email to php-general+get-311744@lists.php.net to get a copy of this message
On 03/08/2011 09:46 AM, Marc Guay wrote: > Hi Scott, > > I'm glad you resolved your problem. I'm curious about your method > though, as it seems to be an entirely different approach to my own. > How do you refer to your session data throughout the rest of the site? > Do you always reference the $_COOKIE variables or do you utilise > $_SESSION's at some point? I'll summarize... Everytime I hit a page I open a session with a session time of 7 days. If the user logs in correctly it stores the user information in $_SESSION, and then the site sees their login info and lets them past the login screen. If, at the login screen, they select public terminal it sets the session cookie length to 0 and regenerates the cookie to expire on browser close. Everything after that is pulled from the $_SESSION variable.

« previous php.general (#311744) next »