title: If / else if / else with query to a database resulting false.
body: <p>I have a select box with an option for All, and then a list of users.</p>
  
  <p>What I'm struggling with is creating something like this.  I have most of it except trying to query the database to for it to check if the variable is in the database.</p>
  
  <pre><code>   if ($variable == 'All') { code here }
  
     else if ($variable != 'ALL' != *[result in database]*) { code here }
  
     else { code here }
  </code></pre>
  
  <p>I have most of it except trying to query the database to for it to check if the variable is in the database.</p>
  
  <p>Any suggestions how I can encorporate a query of a mySQL database in my if statement.</p>
  
  <p>Thanks </p>