title: Creating filters for a mysql, php table
body: <p>I am trying to create a filter tab for my table that will have a few different options when clicked filter the data from the table and display a new set of results, a single selection from each drop down will then filter table results.
  Have tried a few tutorials to no avail(I am a beginner with PHP, js)</p>
  
  <p>Here is my code;</p>
  
  <p>Display Table on page;</p>
  
  <pre><code>&lt;?php 
  $con=mysqli_connect("localhost","root", "", "database");
  // Check connection
  if (mysqli_connect_errno())
  {
  echo "Failed to connect to MySQL: " . mysqli_connect_error();
  }
  
  $result = mysqli_query($con,"SELECT * FROM table GROUP BY id DESC LIMIT 25");
  
  if (!$result) {
      printf("Error: %s\n", mysqli_error($con));
      exit();
  }
  
  echo "&lt;table border='5' class='table'&gt;
  &lt;tr&gt;
  &lt;th&gt;Game ID&lt;/th&gt;
  &lt;th&gt;Game Name&lt;/th&gt;
  &lt;th&gt;Category&lt;/th&gt;
  &lt;th&gt;Suggested LVL&lt;/th&gt;
  &lt;th&gt;Insert Date&lt;/th&gt;
  &lt;/tr&gt;";
  
  while($row = mysqli_fetch_array($result))
  {
  echo "&lt;tr&gt;";
  echo "&lt;td&gt;" . $row['id'] . "&lt;/td&gt;";
  echo "&lt;td&gt;" . $row['gamename'] . "&lt;/td&gt;";
  echo "&lt;td&gt;" . $row['gamecategory'] . "&lt;/td&gt;";
  echo "&lt;td&gt;" . $row['gamelevel'] . "&lt;/td&gt;";
  echo "&lt;td&gt;" . $row['listdate'] . "&lt;/td&gt;";
  echo "&lt;/tr&gt;";
  }
  echo "&lt;/table&gt;";
      ?&gt;
  </code></pre>
  
  <p>What I would like the filter to be like;
  It is just an example, and the cars have nothing to do with my game database.</p>
  
  <pre><code>    &lt;div class="input-group"&gt;
  &lt;select&gt;
    &lt;option value="volvo"&gt;Volvo&lt;/option&gt;
    &lt;option value="saab"&gt;Saab&lt;/option&gt;
    &lt;option value="mercedes"&gt;Mercedes&lt;/option&gt;
    &lt;option value="audi"&gt;Audi&lt;/option&gt;
  &lt;/select&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>Im just kind of stumped on where to go from here, is there any handy free jquery plugins, AJAX, or any other options? </p>
  
  <p>Thanks for the help</p>