Okay i think i understand now. Can i do it like this:
When user signs in i Serialize the information I want to hold in my session.
"$userinfo = $row['userid'].','.$row['privs'];
$_SESSION['user'] = base64_encode(serialize($userinfo));"
And then i would then just unserialize the session and define variables with the values...:
// Fetch User Information
$member = unserialize(base64_decode($_SESSION['user'])); $mdata = explode(',',$member); // Assign User Info define ("USERID",$mdata[0]); define ("PRIVS",$mdata[1]);
Then on one of my pages i would put:
// Check User Permissions if (PRIVS < "3") { // Check to see if user is LEVEL 3 or higher @header("Location:index.php?p=denied");// Send them to denied page die("<script>window.location='index.php?p=denied';</script>"); //js redirect backup }