I am creating an application where users cannot attempt multiple logins. If a particular user logs in, my database flag value becomes set to 1 that means no other member who has the same username and password can login.
If a user signs out my database flag value is set to 0. That's all working fine but now I have one different problem that is when a user suddenly closes the browser without logout page or session is timeout then automatically the database flag value should be set to 0. Now I don't know how to do it. Please give me any solution.