title: Figuring out why I am getting a Resource ID #5 error
body: <p>This is a part of my code, and the echo is to test the value and it gives me Resource ID #5</p>
  
  <pre><code>$id = mysql_query("SELECT id FROM users WHERE firstname='$submittedfirstname' AND lastname='$submittedlastname' AND email='$submittedemail'") or die(mysql_error());
  $counter = mysql_num_rows($id);
  echo $id;
  </code></pre>
  
  <p>I am just getting into programming, and lately seeing lot of Resource ID outputs/errors while working with Databases.</p>
  
  <p>Can someone correct the error in my code? And explain me why it isnt giving me the required output?</p>