Sam, There is a way to keep a session active beyond the death of the browser, but the odds are that this will not do exactly what you want either, since killing the session on browser close is the customary setting.
In my case I expected closing the browser to kill the session (or more correctly cause the browser to drop the cookie for the session ID). php.ini parameter session.cookie_lifetime was set to a value other than zero, and my sessions remained active even after the browser was closed (probably had other things going on as well), so that opening a new browser picked up the same session key (not too cool for my app) ;-). I'm not sure you want to deal with other aspects of this, like manually opening a new browser and using the session key (same cookie) of a browser already open? Just be careful. Warren Vail -----Original Message----- From: Daniel Guerrier [mailto:[EMAIL PROTECTED] Sent: Thursday, October 09, 2003 1:23 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] session experation The session will die on browser close. What you are asking for is how to use cookies. You can set a cookie and use the information in that to determine user functionality http://us2.php.net/manual/en/function.setcookie.php --- Sam Folk-Williams <[EMAIL PROTECTED]> wrote: > Hi, > > I want to extend the length of a session based on > the existance of a > variable beyond the closing of the browser. > Basically, I've got a restricted > intranet where staff have to log-in and I want to > add a "remember me" > option. If they check off the remember me box, then > the session will be set > to expire in one year instead of as soon as the > browser closes. Is there a > way to do this without altering the php.ini file? > (I'm in a shared hosting > env and don't think I can alter that file). > > Or, is there a better way to acheive this result? > > Thanks, > > Sam > > -- > Sam Folk-Williams > Service Team Leader/Webmaster > Rise, Inc -- Creative Partnerships South > (952) 884 8330 (V); (952) 884 8371 (F) > www.rise.org > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php