How to avoid multiple login in one machine

Hi, can i ask some help in my page,when i am loggin in to my admin page then if i will go to my client page without logging out to my admin page.it will directly logged in to the client page…how do i prevent this so that it will not automatically logged in to my client page.please help me i have no idea how to solve this.

Thank you in advance.

What data are you writing (such as Session/Cookie) when the login is validated? What are you comparing when you re-visit the site to see if the person is logged in or not?

Once you can show us that code for both the Admin and the Client side of things, we can work on a solution.

When verifying log in and grabbing ID to save to cookie or session, you can also grab the table field “level” or “permissions” and set this value to session as well. Only those who have for example $_SESSION[‘secure_level’] == “Admin” can enter/view admin pages. An easy adjustment to the client validation script would allow “Admin” to ghost the client section.