这是我的代码:是否有可能使
if(isset($_GET['home'])){
if($_SESSION['valid_user']==null){
$_SESSION['pages']=0;//this is when user is not login or visitor
}else{
if($_SESSION['valid_admin']==1){
$_SESSION['pages']=1;//this is when user is login as admin
}else{
$_SESSION['pages']=2;//this is where user is login
}
}
}
当我像这样编写代码时。
if(isset($_GET['home'])){
if($_SESSION['valid_user']==null){
$_SESSION['pages']=0;//this is when user is not login or visitor
}else{
if($_SESSION['valid_admin']==null){
$_SESSION['pages']=0;//this is when user is login as admin
}else{
$_SESSION['pages']=2;//this is where user is login
}
}
}
如果valid_admin或admin_user登录我应该把代码放在哪里我为我的主页创建了3个不同的页面.. 1 =用户1 =管理员和1 =访客对不起我的英语不好我只是php中的新手...