title: Query search with multiple checkboxes names
body: <p>I have this music site where i have a search sidebar where i want people to be able to find the right musician profile from my table. The search form is built with checkboxes and hooked up to my table with PHP and MySQL. I want people to find profiles from categories like location, user type, genre of music they play and if they have an album release.</p>
  
  <pre><code>&lt;form action="udforsk.php"  method="post" enctype="multipart/form-data"&gt;
    &lt;h2&gt;User type&lt;/h2&gt;
    &lt;input type="checkbox" name="type[]" value="Solo"&gt;
    &lt;input type="checkbox" name="type[]" value="Duo"&gt;
    &lt;input type="checkbox" name="type[]" value="Band"&gt;
  
    &lt;h2&gt;Location&lt;/h2&gt;
    &lt;input type="checkbox" name="location[]" value="area_1"&gt;
    &lt;input type="checkbox" name="location[]" value="area_2"&gt;
    &lt;input type="checkbox" name="location[]" value="area_3"&gt;
    &lt;input type="checkbox" name="location[]" value="area_4"&gt;
    &lt;input type="checkbox" name="location[]" value="area_5"&gt;
  
    &lt;h2&gt;Genre&lt;/h2&gt;
    &lt;input type="checkbox" name="genre[]" value="genre_1"&gt;
    &lt;input type="checkbox" name="genre[]" value="genre_2"&gt;
    &lt;input type="checkbox" name="genre[]" value="genre_3"&gt;
    &lt;input type="checkbox" name="genre[]" value="genre_4"&gt;
    &lt;input type="checkbox" name="genre[]" value="genre_5"&gt;
  
    &lt;h2&gt;Album or demo&lt;/h2&gt;
    &lt;input type="checkbox" name="release[]" value="album"&gt;
    &lt;input type="checkbox" name="release[]" value="demo"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>I want this to be hooked up width a query, but i have problems how to deal with searches where some of the categories haven't been filled out. Like if none of the locations checkboxes is checked all locations is fair game in the query search.</p>
  
  <p>Right now i'm trying to use IN to search after users my query looks like this but it gives me trouble when the $_POST input is empty. Right now i'm just trying to make it work with locations and genre. </p>
  
  <pre><code>$sql = "SELECT artist.ArtistID, artist.ArtistName, artist.RegionID, 
  artist_genre.ArtistID, artist_genre.GenreID
  FROM artist, artist_genre
  WHERE artist.RegionID IN ($areaer) AND artist_genre.GenreID IN ($genrer)";
  </code></pre>
  
  <p>All help how query searches with multiple search variables with checkboxes in general would be alot of help.</p>