title: how to know which buttons submits the form php
body: <p>i have two buttons of type submit in my <code>view</code>:</p>
  
  <pre><code> &lt;button type="submit" class="btn btn-default btn-xs" name="Excel"&gt;
     &lt;span class="glyphicon glyphicon-download-alt"&gt;&lt;/span&gt;&amp;nbsp; Download as Excel
   &lt;/button&gt;
  
   &lt;button type="submit" class="btn btn-default btn-xs" name="Resume"&gt;
     &lt;span class="glyphicon glyphicon-download-alt"&gt;&lt;/span&gt;&amp;nbsp; Download Resume
   &lt;/button&gt;
  </code></pre>
  
  <p>and <code>controller</code>:</p>
  
  <pre><code>if ($this-&gt;input-&gt;post('Resume')) {
    echo "Resume Clicked";
  }
  
  if ($this-&gt;input-&gt;post('Excel')) {
    echo "Excel Clicked";
  }
  </code></pre>
  
  <p>i would like to know that which button has submitted the form for that i have written the above code..but i am not getting any <code>echo</code> after clicking any of the button..</p>
  
  <p>i don't want to use here:</p>
  
  <p><code>&lt;input type='submit' name='excel' value='Excel'/&gt;</code></p>
  
  <p><code>&lt;input type='submit' name='excel' value='Excel'/&gt;</code></p>
  
  <p>as it works with the type 'input' i would like to use <code>button</code> of <code>type</code> <code>submit</code></p>