The problem is when the user logged-in after that user tries to login again with same/diff credentials in same browser it is accepting ...
I don't know where i kept wrong..
Here is the loggedin.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>';
?>
Any suggestions will be acceptable...