title: How to submit 2 forms in one page with a single submit button
body: <p>I've created a php page with two forms but I would like to have only one submit button for both forms. the forms have the <code>id</code>s <code>firstform</code> &amp; <code>secondform</code>. I have tried other scripts but they don't really work.</p>
  
  <p>Here is my code below:</p>
  
  <pre><code>&lt;script language="javascript"&gt;
  submitForms = function(){
      document.getElementById("firstform").submit();
      document.getElementById("secondform").submit();
  }
  
  &lt;/script&gt;
  
  &lt;input type="image" src="images/order-button.png" name="button" value="Submit" onclick="submitForms()"/&gt;
  </code></pre>