Trouble checking SESSION cookie


Posted on 16th Feb 2014 07:03 pm 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

No comments posted yet

Your Answer:

Login to answer
269 Like 38 Dislike
Previous forums Next forums
Other forums

How to store checkbox array in a session, and then be able to add to it?
I'm trying to store an array of checkbox values into a session array, sort of like a shopping cart,

WS-Security PL/SQL Forms
Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Prod
PL/SQL Release 10.2.0.2.0 - P

Please Help my PHP Dating Function.
Hi everyone!

Well here is my code that displays this:

It works wonderful.


add text and number image
hi guys ..

ok see i want the user to add their name and pick a number then click get it and i

trouble printing an array....
I'm having some trouble printing out an array forwards. I'm figuring out the high and low of an arra

What are the two different files you download to update kernel?
What are the two different files you download to update kernel?

how to validate date using javascript
I need to validate date in textbox using javascript..
The date is must be not greater than TODAY

help with multi-update
Now sure how to ask this really....
10g database if that matters.

I have a customer

How to login with SAPCPIC userid
I have changed the Password for SAPCPIC in Development Server for 000,001 and 100 client.
But w

simplexml_load_file and rss problem
Hi,

I have a problem parsing an rss feed using simplexml_load_file - this is strange as i hav

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash