Hi,
You can do this with a simple coding. You call a javascript function in the body onblur event of the page. In the javascript call a php file like logout.php in which u destroy the session value and make the user erased from your logged in database.
Hope this helps in getting the solution.
Carlos Arnt wrote:
Hi ,
I have a PHP script that store into a Mysql database informations about users accounts and when users are online .
Well i note that when a users click on logout button , my php successfull erase the data in the loggedin database , then when he's back to login in system the program know that he is now online then leave he's in if the login/pass is corret .
But when the user are online and just (close) the browser , he has not beed erased from my loggedin database .
Then when he back and try login the system still think that he is online and don't accept his login/pass .
My question is :
How can i put my php to inform MYSQL to erase that data in loggedin when the users is not more online and just close the browser without leave correctly ??
???????????
Thanks .
Carlos .