session_start();
header('cuntent-type:text/html');
if(isset($_SESSION['usename']) && $_SESSION['usename']==='lunan'){
exit('已经登录,请勿重复登录') ;
}
if(isset($_POST['submit'])){
if(isset($_POST['usename'])&&isset($_POST['password'])&&$_POST['usename']==='lunan'&&$_POST['password']==='123'){
$_SESSION['usename']=$_POST['usename'];
header('location:240.php?info=登录成功');
}else{
echo 'cookie设置失败';
}
} else{
header('location:241.php?url=240.php&info=abc');
}
}
Tobey_滔