если целое число isvolun равно 4, я должен отправить пользователя в другой сеанс
usertable:
username
password
email
isvolun
//check if there is username and password works fine and findes if there is 1 row to login
admin=1;
if ($result = $conn->query("SELECT * FROM usertable WHERE username='$username' &&password='$password'")) {
$num = $result->num_rows;
$result->close();}
}
мне нужно штрафовать значение isvolun, но оно не работает
if ($result = $conn->query("SELECT isvolun FROM usertable WHERE username='$username' && password='$password'")) {
$admin= $result;
$result->close()}
Поскольку я не нашел isvolun, он тоже не работает
if($num==1){
if($admin==4)
header('Location:../indexEN.php');
}