Hi,
I have written an application that (supposed to) use session.
this is what`s at the header of each file:
session_cache_limiter('private');
session_cache_expire(30);
session_start();
when someone log in, I set the $_Session:
//the first_name comes from MySQL database.
$_SESSION['name']=$row['first_name'];
now, when I go back to the main page (index.php) there is the code:
if (isset($_SESSION['name']))
{
echo 'Hello, ',$_SESSION['name'],', and wellcome back.<br>';
}
else
{
echo 'Hello, Guest.<br>';
};
The problem is that after a user logged in, the session stays forever (untill someone else logs). I left it the whole night, and when I came back and refreshed (on 'index.php') I still got the $_SESSION['name'] with the last user that entered the system.
Do you know what`s wrong?
Tnx,
Scheiner