title: MySQL Select based on drop down value
body: <p>I have the following code:</p>
  
  <pre><code>&lt;?php
  session_start();
  include_once("config.php");
  
  $query = "SELECT Category FROM books";
  $result = mysqli_query ($mysqli, $query);
  
  echo '&lt;select name="dropdown" value=""&gt;&lt;option value=""&gt;Dropdown&lt;/option&gt;';
      while($row = mysqli_fetch_array($result))
      {
          echo '&lt;option value="' . $row['Category'] . '"&gt;' . $row['Category'] . '&lt;/option&gt;';
      }
      echo "&lt;/select&gt;";
  
  ?&gt;
  </code></pre>
  
  <p>the values of the drop down box are filled from the database.
  I was wondering if theres a way to have a select statement that will run when a user clicks on one of the options in the drop down menu and then populate the results in a table?</p>
  
  <p>any information will help!</p>
  
  <p>Thanks</p>