A quick overview:
After the login form is submitted, it is handled by a seperate file, which checks the form and sets session variables if the login was successful.
The script works fine...it will log me in, and redirect me to the proper page as well as set the session variables.
Now here is where things get weird
If the login is successful, you are redirected to the home page.
If I print any of the following on the home page:
$_SESSION['username'], $_SESSION['my_email'] and $_SESSION['my_location']
it works, no problems.
HOWEVER, once I leave the home page (say I click the link to check my messages),
$_SESSION['username'] mysteriously disappears!! Even if I simply refresh the page as soon as I am logged in, the variable becomes unset.
I can still use
$_SESSION['my_email'] and $_SESSION['my_location'] with no problems, it is only the
$_SESSION['username'] that disappears.
Has anyone ever had this issue or have any ideas on how to resolve this?