mikejg
12th July 2006, 10:43 AM
The php all renders just fine and dandy, but I do have an issue. Currently running FC 5, MySQL is 5 something or other, as is the php install too.
When "Logging in" on the website I am creating, I set some session variables:
$_SESSION['first_name'] = $row["fname"];
$_SESSION['last_name'] = $row["lname"];
$_SESSION['email_address'] = $row["email"];
$_SESSION['user_id'] = $row["userId"];
$_SESSION['access_level'] = $row["access_level"];
The problem is, when re-directing back to the main page (index.php), the page checks to see if the
$_SESSION['access_level'] > 1
If it is, the page displays with a side menu which has various items dependant upon their access level. Right now, though, there is no menu - which relates to if no session (or less than 0) for access level is set, then it's just the main page only.
So I am assuming that somewhere I have not got it set up for sessions correctly - but I am having a bit of difficulty trying to find exactly where I should be checking. I disabled SElinux (or whatever its called), and google searches for sessions + php + fedora brings up lots of extraneous rubbish (about meetings/conventions) instead of what I am after.
Any suggestions, hints, tips or links to relevant articles would be much appreciated. Searching the forums didn't seem to yield anything that I could recognise as relevant.
When "Logging in" on the website I am creating, I set some session variables:
$_SESSION['first_name'] = $row["fname"];
$_SESSION['last_name'] = $row["lname"];
$_SESSION['email_address'] = $row["email"];
$_SESSION['user_id'] = $row["userId"];
$_SESSION['access_level'] = $row["access_level"];
The problem is, when re-directing back to the main page (index.php), the page checks to see if the
$_SESSION['access_level'] > 1
If it is, the page displays with a side menu which has various items dependant upon their access level. Right now, though, there is no menu - which relates to if no session (or less than 0) for access level is set, then it's just the main page only.
So I am assuming that somewhere I have not got it set up for sessions correctly - but I am having a bit of difficulty trying to find exactly where I should be checking. I disabled SElinux (or whatever its called), and google searches for sessions + php + fedora brings up lots of extraneous rubbish (about meetings/conventions) instead of what I am after.
Any suggestions, hints, tips or links to relevant articles would be much appreciated. Searching the forums didn't seem to yield anything that I could recognise as relevant.