title: Multiple forms same page submit only one ajax
body: <p>I have a page that dynamically create forms from rows in the DB.  Each table row contains a form with a submit button to delete a record from the DB.  I can't seem to figure out how to pick the current form to submit.  They all have different IDs, but how does the script know what form the use clicks on?</p>
  
  <pre><code>&lt;form name="myForm" id="1"&gt;
  &lt;input type="hidden" name="id" value="1"&gt;
  &lt;input type="hidden" name="table" value="sales"&gt;                          
  &lt;button name="command" type="submit" class="btn btn-danger" title="Delete"&gt;
  &lt;i class="fe fe-trash-2"&gt;&lt;/i&gt;&lt;/button&gt;
  &lt;/form&gt;
  
  &lt;form name="myForm" id="2"&gt;
  &lt;input type="hidden" name="id" value="2"&gt;
  &lt;input type="hidden" name="table" value="sales"&gt;                          
  &lt;button name="command" type="submit" class="btn btn-danger" title="Delete"&gt;
  &lt;i class="fe fe-trash-2"&gt;&lt;/i&gt;&lt;/button&gt;
  &lt;/form&gt;
  
  $('input[type="submit"]').click(function(){
      var thisForm = this.form;
  
          $.ajax({
              url: "delete_do.php",
              method: "POST",
              data: $(thisForm).serialize(),
  
          });
  
  });
  </code></pre>