When a user login ,
update play set login='1';
when logout ,
update play set login='0';
but when the user close the browser/tab without using 'logout' , How I can change the value login to '0'.
I m using this 'login' as a flag so that no 2 members cannot login with the same username. (user names are created by the admin and distributed to the students.Password is not used.)
If a particular user logged in then first check his 'login'. if login = 0 then that user 'login' will be updated as 1. else echo already logged in.
Is there any other way to implement this.