title: SQL query using checkboxes
body: <p>I've seen some questions about this topic around here, but non of them solved my problem. I'm trying to make a simple filter using SQL and check boxes.</p>
  
  <p>So far I got this code:</p>
  
  <pre><code>&lt;form action="#" method="GET" id="filter"&gt; 
      &lt;input type="checkbox" name="omgeving[]" value="Indoor"&gt;Indoor&lt;br /&gt; 
      &lt;input type="checkbox" name="omgeving[]" value="Outdoor"&gt;Outdoor&lt;br /&gt; 
      &lt;input type="submit" name="kies" value="Kies" /&gt; 
  &lt;/form&gt; 
  </code></pre>
  
  
  
  <pre><code>&lt;?php 
  if(isset($_GET['omgeving']) &amp;&amp; count($_GET['omgeving'] &gt; 0)) { 
      $catid = implode(',', $_GET['omgeving']);
      $catid = mysql_real_escape_string($catid); 
  
      $query = mysql_query("SELECT * FROM SomeWhere WHERE Omgeving IN (".$catid.")"); 
  
      while($row = mysql_fetch_assoc($query)) { 
          $id = $row['Id']; 
          $prod = $row['Product']; 
  
          echo $prod . "&lt;br /&gt;"; 
      }
  }
  ?&gt;
  </code></pre>
  
  <p>It does <em>something</em> when I click on <code>submit</code> it changes the URL to: <code>filtertest/?omgeving[]=Indoor&amp;kies=Kies</code> but I think the query isn't working like it should because my footer disappears usually this means that my code is incorrect and the page stops loading further. For the love of me I cant figure out why this isn't working...</p>
  
  <p>Is there someone that could help me?</p>
  
  <p>I've checked out this <a href="https://stackoverflow.com/questions/16123826/multiple-checkbox-filter-in-php">answer</a> but this doesn't solve my problem. The code above is the code that does something at least. </p>
  
  <p>Help...  what am I doing wrong here?</p>