Strange dumping session behavior

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I am having this strange session related problem.  Basically I am starting
a session on a succesful login and forwarding them to a page using:

<?
session_start();
$_SESSION['admin_id'] = $id;
header("location:mainmenu.php?" . sid);
?>

This works fine and they can naviagate around a bit.  But when they return
to a few of the pages for some reason the session appears to be terminated
and sends them back to the login screen.  Each page in the site contains
this check to make sure they have logged in:

<?
session_start();
if(empty($_SESSION['admin_id']))
{
header("Location: login.php");
}
?>

The script seems to work fine...just for some reason every 3 page changes
or so seems to terminate the session and then  $_SESSION['admin_id'] ends
up being null sending them back to the login.

Why would the session be terminated in such an odd fashion?

Thanks for any help or suggestions you might be able to provied!
ROn






[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux