I have an application that I need users to be logged into automatically without creating an id. I have setup a database with users names as user1, user2, user3, and so on, and a field called in_use. I can make php set the in_use field in the database to yes when the page is loaded and I can get php to select the first available username. I can't however get the database to reset the in_use field by itself (if the user closes the window insted of clicking log out).
Any ideas?