I have a slight problem. I use a MySQL database for login, then use the session_register('userpriv') which is an array of privileges. It works fine with the login and logout page which have the following ways to asign if you are logged in
session_start();
session_register('userpriv');
$userpriv['login'] = 1;
Then the following to log out
session_start();
session_unset();
session_destroy();
Which works fine. I have other user only sites that use that var and works fine. But, I have a menu system that doesn't recognize the session. The menu that has the PHP is a required file in a function of a class called from an included file from the main page. The PHP execution works fine for the menu system, but the simple check below shows that something is not getting into the object to allow sessions
Log in check code
session_start();
if($userpriv['login'] != 1)
{
?>Menu info to be printed<?
}
I am very confused on what the actually problem is. Any suggestions on how to get that object to accept that same session?
Thanks
PS, I checked session ID's and they are the same!