php - Unlock table if browser is closed
If someone wants to edit an entry in a table, I put a column "Locked" to true. If the user closed the browser / tab, how can I do it best so that the value is written by "Locked" back to false?
Is that possible with ajax? This can be seen when the user closes the browser / tab, then that ajax event fired?
Or is there a better and more reliable method? I work with laravel 4 und MSSQL.