TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 11-12-2010, 11:30 AM   #1 (permalink)
The Visitor
Newcomer 
 
Join Date: Nov 2010
Posts: 1
Thanks: 0
ewannnn is on a distinguished road
Default 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
ewannnn is offline  
Reply With Quote
Old 11-14-2010, 02:45 PM   #2 (permalink)
The Wanderer
 
Join Date: Oct 2010
Posts: 7
Thanks: 0
jgetner is on a distinguished road
Default

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.
jgetner is offline  
Reply With Quote
Old 02-18-2012, 09:51 PM   #3 (permalink)
The Wanderer
 
AxelG's Avatar
 
Join Date: Feb 2012
Posts: 16
Thanks: 0
AxelG is on a distinguished road
Default

You can use a javascript for that.
AxelG is offline  
Reply With Quote
Old 08-23-2012, 02:57 AM   #4 (permalink)
The Visitor
 
Join Date: Aug 2012
Posts: 2
Thanks: 0
nouris is on a distinguished road
Default

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
nouris is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Destroy Session when close browser Mike General 3 07-09-2009 10:53 PM
Session class.... allworknoplay Absolute Beginners 1 05-04-2009 09:57 PM
Huge Session Problem Killswitch General 1 11-17-2008 02:36 AM
Destroy Session on Browser Window Closing buildakicker General 4 05-08-2008 06:05 PM
Understanding the Life of a Session Wildhoney General 6 10-27-2007 02:34 AM


All times are GMT. The time now is 09:02 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design