I have MYSQL table with users in it. The user can log in using PHP code. Their name is stored in SESSION variable. How can I check if the user is logged in already on another computer to forbid them logging in again?
Scenario:
Computer 1:
USER1 is logged in
Computer 2:
USER1 tries to log in again but they can’t because they’re already logged in on another computer.
Try to create a column “isLogged” in the databank and set it to true o false when the user starts or end a session.
I was doing that and works fine.