问题是当用户在该用户尝试在它接受的同一浏览器中使用相同/不同的凭据再次登录后登录时...
我不知道我哪里做错了。。
这是 login.php
<?php
header("Cache-Control: private, must-revalidate, max-age=0");
header("Pragma: no-cache");
header("Expires: Fri, 4 Jun 2010 12:00:00 GMT");
include('GenericClasses/GenericCollectionClass.php');
include('Models/UsersModel.php');
include('DataObjects/Users.php');
include('DatabaseAccess/DBHandler.php');
session_start();
if(!isset($_SESSION['user']))
{
header('Location: LoginViewController.php');
exit();
}
echo '"<div style="background:white; text-align:right"> Login as:'.$_SESSION['user'].'
<a href="LogoutViewController.php" style="text-align:right">Logout</a></div>"';
$username=$_SESSION['user'];
$model = new UsersModel();
$result = $model->checkUserid($username);
$_SESSION['id']=$result;
echo '<div style="background:white; text-align:right;">'.$_SESSION['id'].'</div>';
?>
任何建议都会被接受...