title: mysqli_query() always return true
body: <p>This is my form:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
    &lt;head&gt;
    &lt;/head&gt;
    &lt;body&gt;
      &lt;form action="register_ajax.php" method="get"&gt;
      &lt;input type="text" name="email"&gt;
      &lt;input type="submit" value="test"&gt;
      &lt;/form&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>This is my php code:</p>
  
  <pre><code>&lt;?php
      $dbc = mysqli_connect("localhost","root","*******","continental_tourism") OR die(mysqli_connect_error());
      $email = $_GET['email'];
      $query = "SELECT email FROM customer_info WHERE email = '$email' ";
      $r = mysqli_query($dbc, $query) OR die(mysqli_error($dbc));
      if($r)
          echo "Email address exists!";
      else
          echo "sss";
  ?&gt;
  </code></pre>
  
  <p>If I enter a correct(Existing email on db) <code>$r</code> is true. But if I enter non existing email, then also <code>$r</code> is true. Why is that? Basically I want to detect the empty set. How can I do it?</p>
  
  <p>Thanks!</p>