title: send data from two forms with one button to one php receiver with ajaxSubmit() function
body: <p>I have two forms in html:</p>
  
  <pre><code>&lt;form id="form1" action="update.php" method="post"&gt;
  &lt;input type="text" name="username1"&gt;
  &lt;/form&gt;
  
  &lt;form id="form2" action="update.php" method="post"&gt;
  &lt;input type="text" name="username2"&gt;
  &lt;/form&gt;
  
  &lt;button type="button" onclick="submitTwoForms();"&gt;Send&lt;/button&gt;
  </code></pre>
  
  <p>Now I send these two forms to one php page named "update.php" by using jQuery Form Plugin.
  Javascript like this:</p>
  
  <pre><code>function submitTwoForms() {
           $('#form1, #form2').ajaxSubmit();
  }
  </code></pre>
  
  <p>The Problem is, update.php can only get the data from the form1, namely the username1.
  How can update.php get the data from form1 AND form2 at the same time?</p>
  
  <p>My update.php like this:</p>
  
  <pre><code>&lt;?php
  $user1 = $_POST['username1'];
  $user2 = $_POST['username2'];
  ?&gt;
  </code></pre>
  
  <p>And I want to keep these:</p>
  
  <ol>
  <li>I want use ajaxSubmit() function because it can handle file uploading.</li>
  <li>I want to keep two forms in html, not one.</li>
  </ol>
  
  <p>Thanks for any help in advance!</p>