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

269 Like 38 Dislike
Previous php-forum Next php-forum
Other php-forum

Putting double spaces instead of single spaces
Im looking at trying to replace all single spacing between fields with double spacing

At pres

Help, Base64 encoding url and decoding server side.
Hello everyone, i have a website with videos and games and also provide an embed code which people c

Mail functionality from localhost to server
Hi

I am facing problem of mail functionality.

When i tested mail functionality in my

simple ping code
been searchin the site/web and found code thats simple but doesnt work.

I have a personal we

php redirecting
i wont open a new thread but i have a question about redirecting....
i wonder why my code doesnt

Streaming local file from PHP while it’s been written to by a CURL process
I am creating a simple Proxy server for my website. Why I am not using mod_proxy and mod_cache is a

Add User script "Could not execute query"
This should be an easy script but I can't get it to run. Can someone please help me?

<

problem with refreshing
in my site, i have an index page, it has a main div. this main div's content is changing according t

Access database inside of a validation class
Hello,

For quite some time, I have been using functions to validate form input and access the

scandir clients directory
hi,
how can i scandir the clients directory? i need a script that when i click a button it will u

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