title: mysql_num_rows() Error
body: <pre><code>&lt;html&gt;
  &lt;form action="update.php" method="POST" name="ID"&gt;
  &lt;input type="text" name="ID""&gt;
  &lt;input type="Submit" value="Submit"&gt;
  &lt;/form&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Up there is the submit form to get an ID number.
  I try to get that ID entered by user ( NOTE: It's a number) and show mysql table row coresponding to that ID.
  Example : User enter 2 and row number 2 from database is shown.
  My problem is that all rows are shown and not only wanted one.
  - Extra Question : How can I show user an error if he entered a NULL value ?</p>
  
  <pre><code>&lt;?php
      $id=$_POST['ID'];
      .
      .
      .
      mysql_connect($host,$username,$password);
  
      if (!mysql_select_db($database))
          die("Can't select database");
      $query="SELECT * FROM table WHERE ID= '$id'";
      $result = mysql_query("SELECT * FROM vbots");
      $num=mysql_num_rows($result) or die("Error: ". mysql_error(). " with query ". $query);
  
      mysql_close();
      .
      .
      .
  ?&gt;
  </code></pre>