Hello,

I'm building a PHP application at the moment but there something that doesn't work for me.

The concept is:
User logs in -> application checks user account in Table1 -> application checks if user is logged in table2 -> application checks ip address in Table2 -> Application inserts ID and IP into table2.

Table1 contains all the users and user data.
Table2 contains the users who are logged in at the moment, it contains there ID and IP.

Normally when a person logs out, the data of the table row will be removed.
But what can I do about the problem, when people don't use the function log out and close the browser instead? The data keeps existing and the user can't login anymore.

Is there a good solution for destroying data on browser close?


Thanks,

Blalien