Forum Moderators: coopster
<?
if (isset($_SESSION['CustomerID']))
{
echo "<a href='faqs.php?sid=1'>Frequently Asked Questions Page</a>";
}
else {
echo "<a href='faqs.php?sid=0'>Frequently Asked Questions Page</a>";
}
?>
AND on the FAQS.php page, I have this code in the heading:
<?
if ($sid) {
session_unregister("CustomerID");
session_unregister("UserID");
session_unregister("FirstName");
session_unregister("AccessLevel");
session_destroy();
}
?>
<? session_start();?>
The faqs.php page is not destroying the session because I can click the back browser button and go right back into a secure area where I am not supposed to be without a correlating CustomerID...any ideas?
[php.net...]
... Do not unset() $_SESSION itself as this will disable the special function of the $_SESSION superglobal.
maybe it is not getting $sid so it isn't entering that if statement.
have you started the session before destroying it?
if none of these avenues help I would then look to your authentication function as it may not be properly evaluating the session.