title: One form spread across multiple pages
body: <p>I have a sales form on my website, which requires users to enter several pieces of information about themselves.</p>
  <p>However, many of the site visitors are either intimidated by the form, or they see it is 'too long'.</p>
  <p>In an attempt to try and make the form process more fun, inviting and 'user friendly', I would like to try to spread the form out over several pages, with creative language on each page to help users feel more at ease with sharing their information a bit at a time before submitting the form.</p>
  <p>I dramatically scaled back the form for this example. What I am particularly lost on, is how to transfer the data from one 'formpage' to the next, as the information stacks up until the final 'submit' page.</p>
  <p>I want it to function like one form spread over several pages.</p>
  <p>Any guidance or advice here would be greatly appreciated.</p>
  <p>Form Page 1</p>
  <pre><code>&lt;html&gt;
  
  &lt;head&gt;
  
  &lt;title&gt;Form Page 1&lt;/title&gt;
  
  &lt;/head&gt;
  
  &lt;body&gt;
  
  &lt;form action=&quot;formpage2.php&quot; method=&quot;POST&quot;&gt;
  
  &lt;input type=&quot;text&quot; id=&quot;userName&quot; name=&quot;userName&quot; placeholder=&quot;Enter Your Name..&quot; required/&gt;
  
  &lt;input type=&quot;submit&quot; value=&quot;Continue&quot;&gt;
  
  &lt;/form&gt;
  
  &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>
  <p>Form Page 2</p>
  <pre><code>&lt;html&gt;
  
  &lt;head&gt;
  
  &lt;title&gt;Form Page 2&lt;/title&gt;
  
  &lt;/head&gt;
  
  &lt;body&gt;
  
  &lt;form action=&quot;formpage3.php&quot; method=&quot;POST&quot;&gt;
  
  &lt;!-- Data Stack from previous formpage(s)--&gt;
  
  &lt;?php
  
  $name = $_POST['userName'];
  
  
  ?&gt;
  
  
  &lt;select id=&quot;userAge&quot; name=&quot;userAge&quot; class=&quot;ageField&quot;&gt;
  &lt;option value=&quot;0&quot; selected=&quot;selected&quot; disabled=&quot;disabled&quot;&gt;Age&lt;/option&gt;
  &lt;option value=&quot;Under 18&quot;&gt;Under 18&lt;/option&gt;
  &lt;option value=&quot;18-25&quot;&gt;18-25&lt;/option&gt;
  &lt;option value=&quot;26-35&quot;&gt;26-35&lt;/option&gt;
  &lt;option value=&quot;36-45&quot;&gt;36-45&lt;/option&gt;
  &lt;option value=&quot;46-55&quot;&gt;46-55&lt;/option&gt;
  &lt;option value=&quot;56-65&quot;&gt;56-65&lt;/option&gt;
  &lt;option value=&quot;66+&quot;&gt;66+&lt;/option&gt;
  
  &lt;/select&gt;
  
  
  &lt;input type=&quot;submit&quot; value=&quot;Continue&quot;&gt;
  
  &lt;/form&gt;
  
  &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>
  <p>Form Page 3</p>
  <pre><code>&lt;html&gt;
  
  &lt;head&gt;
  
  &lt;title&gt;Form Page 3&lt;/title&gt;
  
  &lt;/head&gt;
  
  &lt;body&gt;
  
  &lt;form action=&quot;formpage4.php&quot; method=&quot;POST&quot;&gt;
  
  &lt;!-- Data Stack from previous formpage(s)--&gt;
  
  &lt;?php
  
  $name = $_POST['userName'];
  $age = $_POST['userAge'];
  
  
  ?&gt;
  
  
  &lt;textarea id=&quot;userMessage&quot;  name=&quot;userMessage&quot; placeholder=&quot;Type message here...&quot;&gt;&lt;/textarea&gt;
  
  
  &lt;input type=&quot;submit&quot; value=&quot;Continue&quot;&gt;
  
  &lt;/form&gt;
  
  &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>
  <p>Form Page 4</p>
  <pre><code>&lt;html&gt;
  
  &lt;head&gt;
  
  &lt;title&gt;Form Page 4&lt;/title&gt;
  
  &lt;/head&gt;
  
  &lt;body&gt;
  
  &lt;form action=&quot;formpage5.php&quot; method=&quot;POST&quot;&gt;
  
  &lt;!-- Data Stack from previous formpage(s)--&gt;
  
  &lt;?php
  
  $name = $_POST['userName'];
  $age = $_POST['userAge'];
  $message = $_POST['userMessage']
  
  
  ?&gt;
  
  
  &lt;input type=&quot;checkbox&quot; id=&quot;terms&quot; name=&quot;terms&quot; value=&quot;Agreed&quot;&gt;
  
  
  &lt;input type=&quot;submit&quot; value=&quot;Submit Form&quot;&gt;
  
  &lt;/form&gt;
  
  &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>
  <p>Form Page 5</p>
  <pre><code>&lt;?php
  
  $name = $_POST['userName'];
  $age = $_POST['userAge'];
  $message = $_POST['userMessage'];
  $termsAgreed = $_POST['terms'];
  
  
  /////////////////////////////////////////////////////////////
  /////////////////////////////////////////////////////////////
  
  
  $composition =
  
  &quot;\r\n\n\nName: &quot;                        . $name .
  &quot;\r\nAge: &quot;                             . $age .
  &quot;\r\n\nAgreed To Terms &amp; Conditions?: &quot;  . $termsAgreed .
  &quot;\r\n\n\nMessage: &quot;                     . $message;
  
  
  /* I left out the bottom of this final handling page, 
  because it isn't relevant to my particular issue */
  
  
  
  ?&gt;
  </code></pre>