That is what Session variable are for: To be usable on multiple pages.
I would do the following:
1) Make sure you are making a call to the session_start(); function on each page
2) Check to see if the $_SESSION['user_status'] var has been set on every page. If it is NOT set, echo out something like:
echo '$_SESSION["user_status"] is NOT set';
If it IS set, echo that out instead:
echo $_SESSION['user_status'] . ' IS set.';
By echoing out the values, you will see for sure that it is/not set on certain pages and be able to do some further troubleshooting.
My hunch is that you are not making a call to session_start() OR that you are simply re-assigning a new value to it somewhere by mistake.
Take your time and go through the pages. It is definitely helpful to check the status of your users by employing a function. That way, the method you choose to employ on the site will be consistent:
<?php
// function to check if user is logged in:
function check_user_status {
session_start();
if (!isset($_SESSION['user_status']))
{
echo '$_SESSION["user_status"] Not set!<br />';
$_SESSION['user_status'] = 'guest';
}
else
{
echo $_SESSION['user_status'] . '<br />';
}
}
?>
Then you can include the function in each page as needed. Once you have this debugged, you can modify it to suit your needs...