
solutionmaster
New User
Oct 5, 2007, 7:57 AM
Post #1 of 4
(1866 views)
|
|
Knows when a user has disconnected from a page
|
Can't Post
|
|
I'm trying to write a program that will connect to either MySql or Oracle to store information from a html form. After the information is stored, there will be another web page that will retrieve the data from the database. Simple enough. The problem is that i can only allow one user to see the next available record and lock it in a way that no one else will be able to see that same record; only the next available. So i thought of creating a column on the table that would be marked "unavailable" as soon as the web page is opened and the first record is accessed. okay well, what if the user never clicks on submit to mark the record as "completed" or leaves the computer on indefinitely or the browser crashes. At that point, the record will be marked unavailable forever since any future users will not be able to pull it up. is there any way to: 1) timeout the time it takes for a user to view a record 2) let my script know that the connection between the user and the server has been lost, so i can mark the record "available" and another user can work on it.
|