title: Many Submit buttons for the same html form
body: <p>hope you fine and well,</p>
  
  <p>i have the following form:</p>
  
  <pre><code>&lt;form class="hidden-print"  method="post" action="&lt;?php echo $_SERVER['PHP_SELF'];?&gt;"&gt;                                  
                   &lt;table class="table table-bordered"&gt;
                      &lt;thead&gt;         
                        &lt;tr&gt;
                        &lt;th&gt;ID&lt;/th&gt;
                        &lt;th&gt;Name&lt;/th&gt;                 
                        &lt;/tr&gt;
                      &lt;/thead&gt;
                  &lt;tr&gt;
                   &lt;?php           
                       $pdo = Database::connect();
                       $pdo-&gt;setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);          
                       $sql = "SELECT * from persons";             
                       $i=0;           
                       foreach ($pdo-&gt;query($sql) as $row) {
                              echo '&lt;tr&gt;';
                              echo '&lt;td&gt;'. $row['id'] . '&lt;/td&gt;';
                              echo'&lt;input type="hidden" name="id[]" value="' . $row['id'] . '    "&gt;';                                                       
                              echo '&lt;td&gt;'. $row['Name'] . '&lt;/td&gt;'; 
                              echo'&lt;input type="hidden" name="name[]" value="' . $row['Name'] . '    "&gt;';                                                                             
                              $i++;                          
                      }
                     Database::disconnect();                 
                     ?&gt;                                                   
              &lt;/tr&gt; 
              &lt;/table&gt;
                   &lt;input class="btn btn-primary" type="submit" value="Send" &gt;
              &lt;/form&gt; 
  </code></pre>
  
  <p>let me explain what happening here, my form is PHP_SELF so i post the data to the same page, i created a table inside the form which contains ID's and Names, i loop through the selected data and each row in the table will contain id and name of person, as you see, i defined the inputs name and id as arrays eg. name[] and id[] , and i have a submit button at the end of the form will post the arrays id[] and name[].</p>
  
  <p>now what i want is to put an submit input in each row ! so when i click the submit button it will post just the id and the name  of the person in this row !</p>
  
  <p>is this possible ?! </p>
  
  <p>regards. </p>