title: php url parameters check
body: <p>I'm creating a website that relies on $_GET to function correctly.
  It works like this: <a href="http://www.example.com/show?q=14&amp;i=48" rel="nofollow noreferrer">http://www.example.com/show?q=14&amp;i=48</a> <code>q</code> and <code>i</code>  are IDs on MySQL server that must be fetched using mysql_query() and the like. Parameters are always integers.</p>
  
  <p>If someones type the url without any parameters both PHP and MySQL yells errors. PHP for undefined variable(s) and MySQL for incorrect syntax.</p>
  
  <p>What i've tried so far doesn't works i always get "Error";</p>
  
  <pre><code>if (is_int($_GET['q']) AND is_int($_GET['i']))
  {
   echo "All good.";
  }
  else
  {
   echo "Error.";
  }
  </code></pre>
  
  <p>What am i doing wrong here. </p>
  
  <p>Thanks,
  atno</p>