faqts : Computers : Programming : Languages : PHP

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

52 of 98 people (53%) answered Yes
Recently 1 of 10 people (10%) answered Yes


how can a session be destroyed when user closed window without logging out?
but what if the session is closed because of a network problem

Nov 27th, 2008 05:06
healthy man, dman, ha mo, Evil Tomato, sh, Siyamed SINIR, elco nomeno, http://www.ttnr.org

ey !
you can use the session related commands such as:
session_destroy() or session_end()
Check the PHP manual before posting such idiot questions god damn !#&
er, I don't think that was the question... if the user closes the 
window without logging out, then you can't run the session_destroy() 
command... I would do one of those nasty popup windows (eg, javascript) 
make a very simple php script that says <?php session_start(); 
session_destroy(); ?> and put that in an onClose() javascript event.