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);
Did you know?Explore Trending and Topic pages for more stories like this.
$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

button help
i originally had this but realised it is much easier to have a button.

Code: <?php

CU&UC guide
Hi Gurus,

can anybody provide me the link for CU&UC upgrade guide

Thanks i

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

noob question
i traying to do a php form with auto replay for both(me and the user who send me a mail),

a u

Alternate messaging
I have 4 strings in MySQL db1

$string1 : Hello
$string2 : Hi
$string3 : Great
$strin

multipart emiail forms
Hi All,

I am new to the boards and I've been working on a form (which is rather massive, imo

frames get header location..
i have two frames, one top, one bottom. how do i do a form on the bottom frame that gives me the ur

Saving PHP output as a file
I wondered if anyone knows how to save the rendered output of a PHP script as a file?

I have

mod_rewrite.c on windows ??
why it's not working on windows while it's working on other hosts???

this is the code i got

checkbox update
I am having a brain fart right now and i cant remember how to do this. if anyone could help that wou

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