I am developing a website that shows who-is-online. I mean when a user is online, the website will show all his friend who is online at that momment.
I use this manner to determine online list: when you sign in the website, a new record will be inserted to a table named ONLINE_LIST. When you click to Sign out button, session will be deleted and the same to the corresponding record in ONLINE_LIST table.
The problem is, when user leave my website without clicking to Signout button, how do I delete his session from online_list table.?