title: PHP $_GET Variable check
body: <p>I have some code that checks for a value of say, var in the link.</p>
  
  <p><code>Http://www.blah.com/index.php?var=</code></p>
  
  <p>But when a link like that is sent to the server it returns a database error since var isn't set. I have tried isset (which it is set so that wont stop it) but !empty doesn't stop the var from being sent to the DB.</p>
  
  <p>This is the code</p>
  
  <pre><code>if(isset($_GET['id']) &amp;&amp; !empty($_GET['id'])){
  $id = mysql_prep($_GET['id']);
  ....
  }
  </code></pre>
  
  <p>Any help? </p>