On 03/04/2011 11:48 AM, Marc Guay wrote:
> I think that my suggestion is still a valid solution, someone correct
> me if I'm wrong. Let's say your code went like this:
>
> session_start();
I did a ton of digging and came up with session_regenerate_id()
In my header.php I start the session as normal, and IF the user selects
"public terminal" I use the call set the session cookie length as 0 and
then regenerate the session cookie.
if ($public_term) {
session_set_cookie_params(0);
session_regenerate_id();
}
This way it defaults to a cookie of X days, but if it's a public
terminal it resets the cookie to expire at browser close.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php