Hi ,
I am facing problem related with sign out...
the problem is...
i mentain a database related with loggedin and looggedout.
filed loginId contains value 1 when user loggedin.and 0 when user logged out.
if user signout properly thing are going well no problem..
but when user used to closed browser by using X without signing out...then database field loginId not changed and having value 1 for that user....
i need to update this field to 0 when user closed browser by using X.
Hi Indresh, recently I have seen a website implementing your problem, it is www.reliancebroadband.com.
When we login the session is created with a logout link. If we want to logout we use the logout link. If the user tries close the window directly, then a confirm dialog box appears asking the user that he/she is sure to close the window. If the user clicks yes then session is expired and and some database transactions are done, if he clicks no he will remain in the same page. This is possible with javascript.
This is how you have to do this.
However there is another problem if you go with login and logout status. Think that there is a sudden power cut, than what is the situation.