title: PHP. Display content of SQL table based on selection chosen in dropdown box
body: <p>Sorry if this has been asked and answered but I have looked and can't see it anywhere. Yes I am a nooby.</p>
  
  <p>I have a DB with 3 tables: flour, filler and others.</p>
  
  <p>What I would like to do is have a dropdown List. So, if user chooses flour from the Drop Down box it will display flour table. If the user chooses filler then filler table be displayed.</p>
  
  <p>Hope this is clear. I hope you can help. Thanks in advance.</p>
  
  <pre><code>&lt;Form id="form1" name="form1" method="get" &gt;
  Supplies of
  &lt;select name=filler action="flour.php"&gt;
  &lt;option value="1" selected&gt;flour&lt;/option&gt;
  &lt;option value="2"&gt;filler&lt;/option&gt;
  &lt;option value="3"&gt;others&lt;/option&gt;
  &lt;/select&gt;
  &lt;input type="submit" value="Submit" /&gt;
  &lt;/form&gt;
  
  
  &lt;?php
  header("Content-Type: text/html; charset=windows-1251");
  @mysql_connect('localhost','root','');
  @mysql_select_db('krendel');
  @mysql_query('SET NAMES cp1251'); 
  $res = mysql_query("SELECT * FROM `flour` ") or die(mysql_error());
  $res2 = mysql_query("SELECT * FROM `filler` ") or die(mysql_error());
  $res3 = mysql_query("SELECT * FROM `addit` ") or die(mysql_error());
  </code></pre>