Problem with syntax [closed]

-1

I'm having trouble on the line that is marked below, I did everything and could not solve. Could someone help me?

<?php
    $conexao = mysqli_connect("localhost", "root", "", "banco") or die(mysql_error);

    if(isset($_POST['email']) && isset($_POST['senha'])) 
    {
        $email = $_POST['email']; 
        $senha = $_POST['senha'];

        $get = mysqli_query($conexao, "SELECT * FROM usuarios WHERE email = '$email' AND senha = '$senha'");
        $num = mysqli_num_rows($get);

        if($num == 1){
            whlie($percorer = mysqli_fetch_array($get)){

                $adm = $percorer ['adm']; // o ERRO ESTÁ AQUI

                if($adm == 1){ 
                    echo 'Usuario admistrador';
                }else{ 
                    echo 'Usuario Normal'; }
            }
        }else{ 
            echo 'O email ou senha digitado estão errado.';
        }
    }
?>

ERROR:

  

syntax error, unexpected ';'

    
asked by anonymous 12.12.2017 / 18:53

1 answer

1

The error was in the wrong while writing ...

<?php
$conexao = mysqli_connect("localhost", "root", "", "banco") or die(mysql_error);

if(isset($_POST['email']) && isset($_POST['senha'])) 
{

$email = $_POST['email']; 
$senha = $_POST['senha'];

$get = mysqli_query($conexao, "SELECT * FROM usuarios WHERE email = '$email' AND senha = '$senha'");
$num = mysqli_num_rows($get);

if($num == 1){
    while($percorer = mysqli_fetch_array($get)){

        $adm = $percorer ['adm']; 

        if($adm == 1){ 
            echo 'Usuario admistrador';

        }else{ 
            echo 'Usuario Normal'; }
    }
        }else{ 
            echo 'O email ou senha digitado estão errado.';
}
    
12.12.2017 / 18:56