just set the page content to display according to the active session id if(isset(($SESSION['userid'])...pull correct data -- mysql_query("SELECT * FROM db WHERE userID =".$SESSION['userID'].");
implying that whenever someone logs in $SESSION['userID'] = $string_userID; (pulling the userID from the results of a login -->
...//form submission
if(isset($_POST['login']))
{
//kill existing session
session_destroy();
//start login process
$user_name = $_POST['user_name'];
$password = md5($_POST['password']);
$login = "SELECT * FROM users WHERE user_name = '$user_name' AND password = '$password'";
$login_query =mysql_query($login);
if (!$login_query)
echo mysql_error();
//check for actual user
...
...
//if user is real (real password, id, etc)
while ($results = mysq_fetch_array($login_query, MYSQL_ASSOC))
{
$userID = $results['userID'];
...
...
}//end results loop
$_SESSION['userID'] = $userID;
}//end of if-login check
DISCLAIMER: i didn't test any of this code--that should be obvious
MORE IMPORTANTLY: there's nothing to stop a user from logging in with firefox as one user and then again as another user with safari/ie/chrome