[PHP] how can I logout autamaitcally (using session)
when the user close all the IE windows, should the session be destroyed autamatically? it seems in my website, the session is not destroyed autamatically, so that other people open the IE and see that he can access the website without logging in. so what I should do? thanks a lot for any help or suggestion. wei sun
Re: [PHP] how can I logout autamaitcally (using session)
Thanks a lot. Ye, I am using Apache. So how can I set when the session expires? I should just set the "session.gc_maxlifetime" item in php.ini file or I should write my program? thanks!! - Original Message - From: "Kris Yates" <[EMAIL PROTECTED]> To: "sunwei" <[EMAIL PROTECTED]> Sent: Tuesday, July 01, 2003 2:30 PM Subject: Re: [PHP] how can I logout autamaitcally (using session) > I presume you are running Apache. Apache cannot detect a browser > closing. The user would have to click a logout button, which would > execute session destroy or whatever and redirect them to another page. > That is what I do. My server is set to expire sessions after one hour. > So, if a user just closes the browser, it will eventually be deleted > automatically by Apache. > > HTH > > Kris > > sunwei wrote: > > >when the user close all the IE windows, should the session be destroyed > >autamatically? > >it seems in my website, the session is not destroyed autamatically, so that other > >people > >open the IE and see that he can access the website without logging in. so what I > >should do? > > > >thanks a lot for any help or suggestion. > > > >wei sun > > > > > >
Re: [PHP] how can I logout autamaitcally (using session)
have you read my email and those docs carefully? and you sure I am asking some silly questions? my question is that I have a website. the user may not stay in one page, they may jump from one page to another page so I want to logout the user if he close all the browser windows, in stead one of the browser window. On Tuesday, July 1, 2003, at 04:04 PM, Daevid Vincent wrote: Did you even read the docs on sessions? http://us4.php.net/manual/en/function.session-destroy.php http://us4.php.net/manual/en/function.session-unset.php http://us4.php.net/manual/en/function.session-unregister.php *sigh* Please people, think and at least do the simplest of searching on the site before firing off an email to 10,000 people on this list. -Original Message- From: sunwei [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 01, 2003 2:13 PM To: [EMAIL PROTECTED] Subject: [PHP] how can I logout autamaitcally (using session) when the user close all the IE windows, should the session be destroyed autamatically? it seems in my website, the session is not destroyed autamatically, so that other people open the IE and see that he can access the website without logging in. so what I should do? thanks a lot for any help or suggestion. wei sun -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php