How we can stop a user to login if he/she is already login in php?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you want to stop someone from logging if he already logged from the same computer, then you should redirect from the login.php page (for example) if the session/cookie exists.
If you want to avoid multiple loggins from the same accounts (from another computer) then add a row in the users table on the database which will store the session of the user, when the user is logging in you will store his session ID, then you can identify this user with his session ID.