this is my code: is it possible to make
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
}
}
}
when i make my code like this.
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
}
}
}
where should i put the code for if the valid_admin or admin_user is login i created 3 different pages for my home page.. 1=for user 1=for admin and 1=for visitor sorry for my bad english im am just and newbie in php...