TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   General (http://www.talkphp.com/general/)
-   -   Destroy session on browser exit (http://www.talkphp.com/general/5629-destroy-session-browser-exit.html)

ewannnn 11-12-2010 11:30 AM

Destroy session on browser exit
 
Hi, I was just wondering if there is a simple way to destroy all session variables when a user closes the browser manually as opposed to logging off (so the variables are destroyed when the user goes back to the page)?
I believe there is a way using cookies, but I dont know how to use them or what pages to put them on (i.e. do they go on every page?)
Thanks very much in advance for any advice :-)

jgetner 11-14-2010 02:45 PM

well php cannot detect if the browser has been opened or closed as php is server side you can use javascript for open and closing checks of the browser.

but to destroy a session you just have to use the unset() function on the session.

AxelG 02-18-2012 09:51 PM

You can use a javascript for that.

nouris 08-23-2012 02:57 AM

Longchamp bande est connu comme un fabricant attractif ans originaire du Portugal.Sac Longchamp Cela peut être une governing body de 172 ans a commencé à aider à faire lentonnoir réelle équine.

_______________________________

Equipaciones Futbol 2012

Camiseta Real Madrid Baratas


All times are GMT. The time now is 02:18 PM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0