title: Select field working with onclick without button in php
body: <p>I want to select a option and it will work without button. According to my code it is working onchange. I want it will work onclick.  How can I do this?</p>
  
  <pre><code>&lt;select name="cdate" size="1" class="selhead" id="cdate" onchange="this.form.submit()"&gt;
        &lt;?php 
  
        $sql2=mysql_query("select distinct cdate from coach_shedule where route='$route' order by cdate");
        while($data2=mysql_fetch_array($sql2))
        {
        ?&gt;
        &lt;option value="&lt;?php echo $data2['cdate']; ?&gt;" &lt;?php if($data2['cdate']==$cdate) {echo "selected";} ?&gt;&gt;&lt;?php echo $data2['cdate']; ?&gt;&lt;/option&gt;
        &lt;?php
        }
        ?&gt;
        &lt;/select&gt;
  </code></pre>