scenario is I have different access levels on this site, I have the simple login process working for all valid users however I am now trying to seperate the different users fo different access to pages.
here is my code at the start of my page:
// CHECKS IF THE USER HAS LOGGED IN
session_start();
if(!isset($_SESSION['logged_in']) || !$_SESSION['logged_in']){
header("location:index.php");
}
if(!$_SESSION['mystatus']=='1'){
header("location:access_error.php");
}
so basically I want this page to only be accessible by users with the access level of 1 if they are logged in however do not have the correct access level direct them accordingly.
at the moment it allows users who have logged in with different access levels (e.g 3) to still view this page.
help please.
many thanks,