how to restrict users from entering admin pages from url

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • promise4
    New Member
    • Oct 2016
    • 1

    how to restrict users from entering admin pages from url

    The following is my block of code and still from the url user can access the admin page without been logged in.
    Please, i need help
    Code:
    if(!isset($_SESSION["useradmin"]))
    {
      header('Location: login_admin.php?error=Access denied'); 
      exit();
    }
    Last edited by Dormilich; Oct 13 '16, 06:35 AM. Reason: please use code tags
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    The following is my block of code and still from the url user can access the admin page without been logged in.
    then obviously $_SESSION["useradmin"] is always set albeight with different values.

    Comment

    Working...