title: Submit Multiple Forms on One Page at the Same Time with PHP
body: <p>I've been having trouble creating a custom step-by-step form. I have 8 different forms on one page, where each one is hidden using CSS after each step is complete. I've done some research here, but all the posts I've found involve submitting each form separately. The issue I'm having is with posting all forms at the same time. My HTML looks essentially like this:</p>
  
  <pre><code>&lt;form  method="post" action=""&gt;
    &lt;h1&gt;Choose an animal&lt;/h1&gt;
    &lt;label for="step1-a"&gt;
      Dog&lt;input id="step1-a" value="dog" type="radio" name="step1"&gt;
    &lt;/label&gt;
    &lt;label for="step1-b"&gt;
      Owl&lt;input id="step1-b" value="owl" type="radio" name="step1"&gt;
    &lt;/label&gt;
    &lt;label for="step1-c"&gt;    
      Moose&lt;input id="step1-c" value="moose" type="radio" name="step1"&gt;
    &lt;/label&gt;
    &lt;input id="submit-button" type="submit" value="I'm hidden"&gt;
  &lt;/form&gt;
  &lt;form method="post" action=""&gt;
    &lt;h1&gt;Next, choose a color&lt;/h1&gt;
    &lt;label for="step2-a"&gt;
      Red&lt;input id="step2-a" value="red" type="radio" name="step2"&gt;
    &lt;/label&gt;
    &lt;label for="step2-b"&gt;
      Green&lt;input id="step2-b" value="green" type="radio" name="step2"&gt;
    &lt;/label&gt;
    &lt;label for="step2-c"&gt;    
      Blue&lt;input id="step2-c" value="blue" type="radio" name="step2"&gt;
    &lt;/label&gt;
    &lt;input id="submit-button" type="submit" value="I'm hidden"&gt;
  &lt;/form&gt;
  &lt;label for="submit-button&gt;Submit All&lt;/label&gt;
  </code></pre>
  
  <p>The code above will get the first result but nothing else. I'm using the PHP:</p>
  
  <pre><code>&lt;?php
    echo "You chose " . $_POST['step1']."and ".$_POST['step2'].". Well done.";
  ?&gt;
  </code></pre>
  
  <p>This gives the following result:</p>
  
  <pre><code>You chose dog and . Well done.
  </code></pre>
  
  <p>How can I get all forms to post? Am I doing this all wrong? Thanks!</p>