Error Call to undefined function mysqli_num_roms [closed]

-1

You're giving an error

  

Fatal error: Call to undefined function mysqli_num_roms ()

I've tried to solve it, but I could not.

<?php

  require_once '../includes/configuration.php';

  $userName = $_POST["user-name"];
  $userPass = $_POST["user-pass"];

  $SQL = mysqli_query($con, "SELECT Usuario, Senha FROM administradores WHERE Usuario='$userName' AND Senha='$userPass' ");

  if (mysqli_num_roms($SQL) != 0){

      echo "logado";

  }else{

      echo "Login incorreto";

  }

?>
    
asked by anonymous 16.02.2016 / 19:56

1 answer

1

mysqli_num_roms does not exist, in English lines is rows , so if you want to get the number of lines use:

  if (mysqli_num_rows($SQL) != 0) {
      echo "logado";
  } else {
      echo "Login incorreto";
  }

Always read the documentation:

16.02.2016 / 20:02