title: Submit more than one form in Javascript/ajax or jquery
body: <p>This is what I am trying to do I have 3 forms in one page, i need to have to because one form is open in modal dialog, I wish to submit all 3 forms when the user click in a single button, also I would like a ajax implementation of sucess en error function in the form submit </p>
  
  <pre><code>&lt;script src="https://code.jquery.com/jquery-2.1.1.min.js" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script&gt;
  
  var firstFormData = $("#form1").serialize();
  var secondFormData = $("#form2").serialize();
  var thirdFormData = $("#form3").serialize();
  
  
  $.post(
      URL: test.php             
      firstFormData + secondFormData + thirdFormData
  ); 
  &lt;/script&gt;
  
  &lt;form id="form1"&gt;
  &lt;input type="text" name="one"&gt;&lt;/input&gt;
  &lt;/form&gt;
  
  &lt;form id="form2"&gt;
  &lt;input type="text" name="two"&gt;&lt;/input&gt;
  &lt;/form&gt;
  
  &lt;form id="form3"&gt;
  &lt;input type="text" name="three"&gt;&lt;/input&gt;
  &lt;/form&gt;
  
  &lt;button&gt;submit here&lt;/button&gt;
  &lt;?php 
  
  echo $_POST['one']; 
  echo $_POST['two']; 
  echo $_POST['three']; 
  
  ?&gt;
  </code></pre>