title: onchange select do different mysql query
body: <p>As title says I need help with onchange. I have select tag,and I need to do different mysql query when I choose something from select list. Example:</p>
  
  <pre><code>&lt;select name="list"&gt;
  &lt;option&gt;cars&lt;/option&gt;
  &lt;option&gt;busses&lt;/option&gt;
  &lt;option&gt;trucks&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>and then when i select <code>cars</code> it do this</p>
  
  <pre><code>$query="select * from table where type='cars'";
  </code></pre>
  
  <p>and if I choose <code>trucks</code> it do</p>
  
  <pre><code>$query="select * from table where type='trucks'";
  </code></pre>
  
  <p>and so on...<br/>
  then I need to display the result in div under the list
  example </p>
  
  <pre><code>&lt;select name="list"&gt;
  &lt;option&gt;cars&lt;/option&gt;
  &lt;option&gt;busses&lt;/option&gt;
  &lt;option&gt;trucks&lt;/option&gt;
  &lt;/select&gt;
  &lt;div&gt; this is where I need to display results from query&lt;/div&gt; 
  </code></pre>
  
  <p>Please help!!!</p>