when a user close the browser without login
Posted: Sat Apr 19, 2008 7:41 am
Hello Friends.
I am facing a problem
actually i have to show my user that who is online and offline right now for this i am using a database table. when user login than i make a entry of this record along with the user id and date time. and using these records i can show who is online.
when user logout through logout link than i delete the record along with this userid.
my problem is when user close the browser without logout link than user get logout but the entry which is in the database table is not deleted. as the user does not goes over the logout page and the delete query is not executed..
can anybody suggest me any solution that how i can execute my delete query when user goes logout via the browser closed.
thanks in advance
I am facing a problem
actually i have to show my user that who is online and offline right now for this i am using a database table. when user login than i make a entry of this record along with the user id and date time. and using these records i can show who is online.
when user logout through logout link than i delete the record along with this userid.
my problem is when user close the browser without logout link than user get logout but the entry which is in the database table is not deleted. as the user does not goes over the logout page and the delete query is not executed..
can anybody suggest me any solution that how i can execute my delete query when user goes logout via the browser closed.
thanks in advance