haha thanks dougal. well okay here's some code. this is on a page from which i am frequently 'logged out', though I haven't observed any patterns as to when I get logged out and when I dont.
//check the user's id
$securityArray = explode(";", $folderUid);
$allowed = false;
for($i=0;$i<count($securityArray);$i++)
{
if($securityArray[$i] == (int)$_SESSION['uid'])
{
$allowed = true;
}
}
if($allowed != true) //check if user is allowed to view this folder
{
?><META HTTP-EQUIV="Refresh" CONTENT="0; URL=errors.php?code=11"><? //redirect user if he's not
}
else
{
$uid = $_SESSION['uid'];
}
That snippet takes data from a mySQL db to check whether a given user is allowed to access the page. The different allowed users have uids (user id) stored in an array, so that array is broken up and the $_SESSION value is compared to each uid. if a match is found, the user is allowed to continue, otherwise he's kicked out.
Any ideas? Fishy problem... no clue what's wrong