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

Coding Critique
I was hoping someone could take a second and look down my code and see if they see any problems with

Loosing changed contents when used FM REUSE_ALV_GRID_DISPLAY
Hi,

I have used FM REUSE_ALV_GRID_DISPLAY in my program as below.

CALL FUNCT

Month String to Numeric?
Hi guys,

Given a month as a string, is there a simple way to find the numeric representation

WELCOME SCREEN
first of all let me tell you what does my script do,

it´s a very simple query to show a e

double and single quotes in text fields acting up... help please
Single quotes, when entered into a text field, create an sql error upon Submit. It seems to create t

gather checkbox data from form into email
Hello all,

First, i'd like to thank everyone who responded to my previous posts regarding set

Cursor statement failed with errors
Following statement failed with the errors.

cursor proj_cursor1 is (select projectID from

Material Issuing for receiving batch
Dear All experts in MM/ PP,

Material issuing from main stores to factory is currently usi

Developing Ajax-enabled ASP.Net applications for the iPhone
I would like to develop Ajax web applications using Visual Studio that are optimized for the iPhone.

Get last modified date of web page
Hai All,

In php how can i get last modified date of a give web page . I have tried to g

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