mysqli_fetch_row () espera que o parâmetro 1 seja mysqli_result, booleano dado em

change that if statment to

  if(!$result) {
Santino