0
In the following example the check does not work if the page was sobre
, in this case it displays the page servicos
even though it is not the one requested in the validation. What’s wrong? I realized that this problem only happens in the 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";
}
Thank you, I’ve come across this type of problem several times and always had to find alternative means to solve
– Pedro Silva