title: Filtering MYSQL data using dropdown boxes
body: <p>I have populated an html page with a table from the database. I want to add dropdown boxes at the top that can filter out unnecessary data. How would I go about sending this information to the database to make a query so that I can filter out data with multiple variables?</p>
  
  <p>For example, I have 5 categories, A, B, C, D, and E.
  I have used PHP code to populate the boxes with the possible values/entries for A, B, C, D, and E. I've also added a "NULL entry" in case the user does not want to include this column as part of the filter.</p>
  
  <p>So right now as it stands, for the respective columns we can have:</p>
  
  <pre><code>Apple, always, as, amazing, as, almonds, NULL.
  Belly, boosts, bad, NULL.
  Candy, can, create, NULL.
  Dandy, does, do, don't, NULL.
  Elements, exist, NULL.
  </code></pre>
  
  <p>How would I go about sending the information to the database when the variables are indefinite? They may or may not be set.</p>
  
  <p>I figured I'd start by seeing if the variables were set in the first place by using the isset(), but how would I proceed from there? It seems like a lot of 'if' statements. All I need to do is to change the query based on the values of the variables the user enters. But I don't see an easy way of doing that.</p>
  
  <p>I'll simply be adding "WHERE A = this AND B = that AND C = thisthat AND .." to the end of the query but what if one or more or all of those entries are null? </p>
  
  <p>Thanks a lot for any help.</p>