SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Guru
    Join Date
    May 2012
    Posts
    996
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Post 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.

  2. #2
    Hosting Team Leader silver trophybronze trophy
    cpradio's Avatar
    Join Date
    Jun 2002
    Location
    Ohio
    Posts
    4,810
    Mentioned
    141 Post(s)
    Tagged
    0 Thread(s)
    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.
    Be sure to congratulate xMog on earning April's Member of the Month
    Go ahead and blame me, I still won't lose any sleep over it
    My Blog | My Technical Notes

  3. #3
    SitePoint Evangelist bronze trophy
    Join Date
    Feb 2013
    Posts
    501
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    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.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •