Jump to content

[SOLVED] one session variable not being destroyed


psychohagis

Recommended Posts

I have a system which uses three session variables;  'rank', 'username' and 'userid'.

I was doing the following on 'sign-out' to get rid of these variables:

 

$_SESSION = array();
session_destroy();

 

Which seemed to work as when I checked against uderid:

 

if (!isset($_SESSION['userid']) or $_SESSION['userid'] =='')
{
exit('You are not signed in!');
}

 

It told me I wasnt signed in.  I then wanted to do the following:

 

<?php


if ($_SESSION['rank']=='webmaster' OR $_SESSION['rank']=='chairman' OR $_SESSION['rank']=='secretary' OR $_SESSION['rank']=='treasurer')
{
?>

<br />
<div class="shinydiv">
<div class="title"> Admin</div>
<p>
<?php echo $_SESSION['rank'] ?>
</p>
</div>

<?php

}

?>

 

And for some reason it still appeared If I signed out.

 

I tried dumping all the session variables and the rank variable was the only one that showed up.

 

What's going wrong?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.