selectbox without submit button
<p>I want to POST my values from selectbox without submit button. And want to get values as automatically drop down menu selects value</p>

<p>Trying below sample code but isnt getting required output</p>



<pre><code>&lt;form action="cal1.php" method="post"&gt;
  &lt;select name="modelS" onChange="submit();"&gt;
    &lt;option value="all" selected&gt;Show All&lt;/option&gt;
    &lt;option value="3 Dr"&gt;3 Dr&lt;/option&gt;
    &lt;option value="5 Dr"&gt;5 Dr&lt;/option&gt;
    &lt;option value="Cabriolet"&gt;Cabriolet&lt;/option&gt;
  &lt;/select&gt;
  &lt;input type="submit" value="confirm bike" name="alldetails"&gt;
&lt;/form&gt;
</code></pre>

<p>Now, able to get post values with below code:
But just 1 more query that incase if i remove submit line (remove submit button) and need to get POST value how can i retieve them (ie. without submit button). I tried by using hide but not able to resolve. </p>

<pre><code> &lt;?php if(isset($_POST['submit'])){ echo $_POST['modelS'];}?&gt;

&lt;form action="cal1.php" method="post"&gt; 
&lt;select name="modelS" onchange="this.form.elements['submit'].click();"&gt;
     &lt;option value="A" selected&gt;Show All&lt;/option&gt;
     &lt;option value="B"&gt;B&lt;/option&gt;
     &lt;option value="C"&gt;C&lt;/option&gt;
     &lt;option value="D"&gt;D&lt;/option&gt;
&lt;/select&gt;
&lt;INPUT TYPE="hidden" name=post VALUE=$_POST['modelS']&gt;
&lt;INPUT TYPE="submit" VALUE="search" name="submit"&gt;
&lt;/form&gt;
</code></pre>
