$_SESSION['uname'] = $_POST['uname']; $_SESSION['pwd'] = $_POST['pwd'];
When the user first logs in I also adds two more session variables within accesscontrol():
$_SESSION['editor'] = mysql_result($result,0,"u_editor"); $_SESSION['admin'] = mysql_result($result,0,"u_admin");
Both is either an Y or a N. When showing menus, I use these two session variables to decide wether editor and admin menus should be shown to the present user. Like this:
include ("schedule.php"); if ($_SESSION['editor'] == "Y") include ("editor.php"); if ($_SESSION['admin'] == "Y") include ("admin.php");
But something strange happens. Sometime, while an user who is both admin and editor is logged in, the $_SESSION['editor'] variable is dropped, causing the editor menu not being shown.
A check through all my source code shows that the only instance where I assign is in accesscontrol() shown above.
Are there any known circumstances where session variables are lost?
(I guess that the answer is no, and this is an error caused by myself, but since I can't find it, I have to ask ;)
-- anders thoresson
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php