Trouble checking SESSION cookie

Posted on 16th Feb 2014 by admin

I am trying to use $_SESSION cookies to verify admin privileges .
I don't understand why this is not working:
/*everything above here is working*/
$session = mysql_fetch_array($session_query);
$type = $session['admin_type'];
$name = $session['admin_name'];
$level = $session['admin_level'];
$_SESSION['type'] = $type;
$_SESSION['name'] = $name;
$_SESSION['level'] = $level;
/*This is returning false*/
if(isset($_SESSION['type']))
{
if($_SESSION['type'] == 'regional')
{
header('Location: all_admin.php');
exit();
}
}
What am I not doing right

Other forums