Hey, I am having major trouble with my sessions and I was hoping you guys could help me... I am at my wit's end here.
Basically, I am doing a simple login function with session ids, and want to store two session variables once somebody logs in - username and whether or not they are an admin.
So I have them log in and compare their username and password to my mysql database and if there is a match they get logged in, and so I set:
$_SESSION["username"] = $username
and
$_SESSION["admin"] = 0; // by default
Then I provide them with a link to go back to the main page. But as soon as they do, they change session id's and with it they lose their logged in status!
I am already storing the sessions in an explicit folder that I made with read/write/execute capabilities (chmod 777), and I have verified that the sessions are being created - they're just changing every time the page reloads!
Any idea what could be causing this to happen?
Thanks, Stephen