title: Change display onclick of a button to display a php function
body: <p>I have built a webstore....right now the default display shows all books in the book store...I would like to make it so that when a user clicks best seller it runs the function displayBestSellers...but I want the result to display on the same page...so for example right now it's showing all books but when I click on bestsellers I want it to show the best sellers only and hide all the others...
  Here is my code for the buttons and the functions...</p>
  
  <pre><code>&lt;section&gt;
          &lt;form action="results.php" method ="post"&gt;
          &lt;input type  ="submit" name="submit" value="Show All"/&gt;
          &lt;input type  ="submit"  name="submit" value="Best Sellers"/&gt;
          &lt;select name ="searchtype"&gt;
              &lt;option value="author"&gt;  &lt;/option&gt;
              &lt;option value="author"&gt; By author:   &lt;/option&gt;
  
  
          &lt;/select&gt;
          &lt;select name ="searchtype"&gt;
              &lt;option value="author"&gt;  &lt;/option&gt;
              &lt;option value="genre"&gt; By genre:    &lt;/option&gt;
  
  
          &lt;/select&gt;
          &lt;br /&gt;
  
      &lt;/form&gt;
      &lt;/section&gt;
  </code></pre>
  
  <p>and then I have two php/ MySQL function displayAll($db), which displays all the books in the database and displayBestSellers($db) which displays all the best sellers in the database...
  thanks</p>