title: How can I split a PHP form into two sections, before submission to a database?
body: <p>I have set up a PHP form for a competition for users to enter all information to be stored in a database. I used a NetTut+ tutorial to do so.</p>
  
  <p>I've got the form submitting to the database as required, but with so many additional questions being asked, I would like to split the form into two separate sections. Obviously the first page would say continue to the next step before the second step allowing for the form to be submitted to the database.</p>
  
  <p>The content that the user sees should be split, but should all be a part of the same form. Step 1 > Step 2 before submission.</p>
  
  <p>Would anyone know of or recommend any methods to do this?</p>
  
  <p>I've attached the code below. </p>
  
  <pre><code>&lt;form method="post" action=""&gt;
  
      &lt;fieldset&gt;
  
          &lt;ul&gt;
              &lt;li&gt;
                  &lt;label for="code"&gt;Entry Code On-Pack&lt;/label&gt;
                  &lt;input type="text" name="code" /&gt;
              &lt;/li&gt;
              &lt;li&gt;
                  &lt;label for="name"&gt;Name&lt;/label&gt;
                  &lt;input type="text" name="name" /&gt;
              &lt;/li&gt;
              &lt;li&gt;
                  &lt;label for="email"&gt;Email&lt;/label&gt;
                  &lt;input type="text" name="email" /&gt;  
              &lt;/li&gt;
              &lt;li&gt;
                  &lt;label for="addressone"&gt;Address&lt;/label&gt;
                  &lt;input type="text" name="addressone" /&gt;
              &lt;/li&gt;
              &lt;li&gt;
                  &lt;label for="addressone"&gt;&amp;nbsp;&lt;/label&gt;
                  &lt;input type="text" name="addresstwo" /&gt;
              &lt;/li&gt;
              &lt;li&gt;
                  &lt;label for="addressone"&gt;&amp;nbsp;&lt;/label&gt;
                  &lt;input type="text" name="addressthree" /&gt;       
              &lt;/li&gt;
              &lt;li&gt;
                  &lt;label for="telephone"&gt;Telephone&lt;/label&gt;
                  &lt;input type="text" name="telephone" /&gt;  
              &lt;/li&gt;
              &lt;li&gt;
                  &lt;label for="dob"&gt;Date of Birth&lt;/label&gt;
                  &lt;input name="dob" type="text" value="[dd/mm/yy]" /&gt; 
              &lt;/li&gt;
              &lt;li&gt;
                  &lt;label for="q1"&gt;Where have you seen Cookstown advertised?&lt;/label&gt;&lt;br /&gt;
                  &lt;input type="checkbox" name="q1cb1" /&gt;&lt;label for="q1cb1"&gt;Magazines&lt;/label&gt;&lt;br /&gt;
                  &lt;input type="checkbox" name="q1cb2" /&gt;&lt;label for="q1cb2"&gt;Billboards&lt;/label&gt;&lt;br /&gt;
                  &lt;input type="checkbox" name="q1cb3" /&gt;&lt;label for="q1cb3"&gt;Television&lt;/label&gt;&lt;br /&gt;
                  &lt;input type="checkbox" name="q1cb4" /&gt;&lt;label for="q1cb4"&gt;Radio&lt;/label&gt;&lt;br /&gt;
                  &lt;input type="checkbox" name="q1cb5" /&gt;&lt;label for="q1cb5"&gt;Online&lt;/label&gt;&lt;br /&gt;
                  &lt;input type="checkbox" name="q1cb6" /&gt;&lt;label for="q1cb6"&gt;Public Transport&lt;/label&gt;&lt;br /&gt;
                  &lt;input type="checkbox" name="q1cb7" /&gt;&lt;label for="q1cb7"&gt;Bus Stops&lt;/label&gt;&lt;br /&gt;
              &lt;/li&gt;
              &lt;li&gt;
                  &lt;label for="q2"&gt;How well do you remember those advertisments?&lt;/label&gt;&lt;br /&gt;
                  &lt;input type="radio" name="q2" value="VeryWell"/&gt;&lt;label for="q1cb1"&gt;Very well&lt;/label&gt;&lt;br /&gt;
                  &lt;input type="radio" name="q2" value="FairlyWell"/&gt;&lt;label for="q1cb2"&gt;Fairly well&lt;/label&gt;&lt;br /&gt;
                  &lt;input type="radio" name="q2" value="FewDetails"/&gt;&lt;label for="q1cb3"&gt;A few details&lt;/label&gt;&lt;br /&gt;
                  &lt;input type="radio" name="q2" value="NotAtAll"/&gt;&lt;label for="q1cb4"&gt;Not at all&lt;/label&gt;&lt;br /&gt;
              &lt;/li&gt;
                  &lt;label for="tc"&gt;Do you accept the terms and conditions&lt;/label&gt;
                  &lt;input type="checkbox" name="tc" class="styled" /&gt;
              &lt;/li&gt;
              &lt;li&gt;&amp;nbsp;&lt;/li&gt;
              &lt;li&gt;
                  &lt;input type="submit" value="Enter Competition" class="large blue button" name="signup" /&gt;           
              &lt;/li&gt;
          &lt;/ul&gt;
  
      &lt;/fieldset&gt;
  
  &lt;/form&gt; 
  </code></pre>