Hello everyone, I have this function if
it collects a variable coming from login.php and does a check to choose between two menus. But it does not matter the result inside the variable $permt
it always chooses else. Someone can point out my mistake.
<?php
include"in/login.php";
$hi=$svc['nome']."";
$permt=$svc['nivel']."";
?>
<?php
if($permt==1) {
require_once"in/menu.html";
echo "$permt";
}
else{
require_once"in/menu2.html";
echo "$permt";
}
?>
To complement this is the content of login.php
<?php
include "conecta.inc";
$log= mysqli_query($conn,"select nome,nivel from usuarios where login='$doc' ");
$svc=mysqli_fetch_array($log);
if($cont){
header("Location: ../home.php"); exit;
}