Two different problems.
You’re right, they’re two different problems, now I see it more
- Different people are able to login at the same time with the same
username using different PCs. To prevent that you need to write into
the database when someone is logged in and have them logout or
I’ll try that, if I understood I need a sort of flag[in db] that
indicates me if a user is connected or not and validate that flag in
- Someone on one PC logs in, closes the browser, re-opens the browser
and attempts to login again. That is what’s giving you a problem in
your original post. So do what was recommended and automatically login
the user if they still have a valid session.
OK, I’ll do as recommended!
I’ll check what a session cookie is and write if that worked.
A session cookie expires when the user closes their browser. If you
really want to force the user to re-login when they close the browser
and then re-open it soon thereafter this is the way to go. But this
doesn’t at all prevent multiple people from using the same username/
password at the same time.
I’ll try it, too. But I think the point 2 it’s a better solution
Thanks for the reply!!!
I’m going to try this new things and write if it worked!