title: How to know what select is submitted in a form if i have two
body: <p>I have a form with two select field. The select use onChange="form1.submit()" to submit form. And how I know what select field in the form is selected by user? I have tried to do this with two Submit Button and I can know what button have submitted easily.</p>
  
  <pre><code>&lt;?php
  if(isset($_POST["select"])) {
          echo "submit";
      }
  if(isset($_POST["select2"])) {
          echo "submit2";
      }   
  
  ?&gt;
  &lt;form id="form1" name="form1" method="post"&gt;
  
  &lt;select name="select" id="select" onChange="this.form.submit()"&gt;
    &lt;option value="1"&gt;Select a&lt;/option&gt;
    &lt;option value="1"&gt;Select b&lt;/option&gt;
  
  &lt;/select&gt;
  &lt;select name="select2" id="select" onChange="this.form.submit()"&gt;
    &lt;option value="2"&gt;Select2 a&lt;/option&gt;
    &lt;option value="2"&gt;Select2 b&lt;/option&gt;
  &lt;/select&gt;
  &lt;/form&gt;
  </code></pre>