title: Check if exist in database mysqli_num_rows
body: <pre><code>$check = mysqli_real_escape_string($link, $_REQUEST['email']);
  $sql = "SELECT * FROM users WHERE email = '$check'";
  if (mysqli_num_rows($sql) == 0)
  {
   echo "1";
  }
  else 
  {
  echo "0";
  }
  </code></pre>
  
  <p>I am trying to check if email exist in database, but whatever value I add for <code>if (mysqli_num_rows($sql) == 0</code> I go only result <code>1</code> or <code>0</code> if the email exist or not.
  Some ideas?</p>