Re: Overriding session length in existing session?

From: Date: Fri, 04 Mar 2011 13:37:38 +0000
Subject: Re: Overriding session length in existing session?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-311659@lists.php.net to get a copy of this message
> This is called globally in *all* my scripts. In another script I'd > really like to set the session to expire after the browser closes if a > uses clicks "public terminal" or something. Howdy. Don't sessions expire when the browser closes as a rule? Do you mean the session cookie? Why not store the cookie, if one exists, in a $_SESSION variable in your header file and then refer to that in the rest of your code, rather than the cookie. Then when you want to destroy the session cookie, you can overwrite it and the existing session will still flow using the $_SESSION vars until the browser closes. It's early here, I hope that sort of makes sense and that I've at least sort of understood the problem. Marc

« previous php.general (#311659) next »