title: How to make an SQL query from form checkboxes?
body: <p>I have two questions, simply for logic:</p>
  
  <p>I need a database with video games (name, cover, description, platform, genre)</p>
  
  <p><strong>How can I make it so the Genre can have multiple values?</strong></p>
  
  <p>For example: <em>Fallout 3 is FPS / RPG but I want to be able to display it if I make a query for FPS only or RPG only.
  Or simply have a page genre.php?genre=FPS which shows all FPS (with FPS/RPG or FPS/MMO games)</em></p>
  
  <p>Is a query with <code>LIKE</code> enough?</p>
  
  <p>And second question:</p>
  
  <p>I have a form with different checkboxes for platforms which sends this to the PHP search script:</p>
  
  <p><em>search.php?q=dead+island&amp;PC=on&amp;PS3=on&amp;Xbox360=on&amp;Wii=on</em></p>
  
  <p><strong>How can I create the SQL query without having to write it for all possibilities?</strong> Knowing that there are a lot of platform (NES, N64 etc.)</p>
  
  <p>Example (simplified):</p>
  
  <pre><code>if(PC=on) = SQL search in platform PC
  
  if(PC=on and PS3=on) = SQL search in platform PC and PS3
  </code></pre>
  
  <p>Thanks for your help!</p>