In the following example the check does not work if the page was sobre
, in which case it displays the servicos
page even though it is not required in the validation. Whats wrong? I realized that this problem only happens in elseif
$status = 1;
$pagina = "sobre";
if($pagina = "home" AND $status == 2 OR $status == 3) {
echo "Página Home";
}elseif($pagina = "servicos" AND $status == 1 OR $status == 2) {
echo "Página Serviços";
}elseif($pagina = "sobre" AND $status == 1 OR $status == 2) {
echo "Página Serviços";
}