title: how to collect radio button value during pagination?
body: <p>I've been working on a small project lately that involves question and answer. So basically it's a quiz/test, whatever you call this page. I made a database as per requirement for all the questions and answers storage. So yea, the output is coming from a database. Now, I need to output 5 questions at a time in a page so used pagination to do it.  </p>
  
  <pre><code>$outputList = '';
  
  while($row = mysql_fetch_array($sql2)){
  
    $question = $row['questions'];
    $opta = $row['optA'];
    $optb = $row['optB'];
    $optc = $row['optC'];
    $optd = $row['optD'];
    $id = $row['ctrlNo'];
    $outputList .="            
                  &lt;p&gt;$id. $question&lt;/p&gt;
  
                  &lt;div&gt;
  
                      &lt;input type='radio' name='question-$id-' id='question-$id-answers-A' value='A' /&gt;
                      &lt;label for='question-$id-answers-A'&gt;A) $opta &lt;/label&gt;
                  &lt;/div&gt;
  
                  &lt;div&gt;
                      &lt;input type='radio' name='question-$id-' id='question-$id-answers-B' value='B' /&gt;
                      &lt;label for='question-$id-answers-B'&gt;B) $optb &lt;/label&gt;
                  &lt;/div&gt;
  
                  &lt;div&gt;
                      &lt;input type='radio' name='question-$id-' id='question-$id-answers-C' value='C' /&gt;
                      &lt;label for='question-$id-answers-C'&gt;C) $optc &lt;/label&gt;
                  &lt;/div&gt;
  
                  &lt;div&gt;
                      &lt;input type='radio' name='question-$id-' id='question-$id-answers-D' value='D' /&gt;
                      &lt;label for='question-$id-answers-D'&gt;D) $optd &lt;/label&gt;
                  &lt;/div&gt;
              ";
  
  } 
  </code></pre>
  
  <p>Okay, so I have 4 radio buttons for the choices of each question and they are all working perfectly. What I can't figure out is collecting their values during pagination. I mean, when I'm on page 1 and submit my answers it's working, but when I go to page 2 and submit my answers it doesn't pass the values collected from page 1. Now I'm running out of ideas how to do it. Can anyone guide me as to what I can possibly do to gather all the values of the selected radio button first from page 1 to the current page of the user and pass it to my php page, which verifies the answers? Here's the code in my html.</p>
  
  <pre><code> &lt;form id="form1" name="form1" action="testpage5.php" method="POST" &gt;
  
   &lt;?php print "$outputList"; ?&gt;
  
   &lt;p&gt;&lt;div style="margin-left:58px; margin-right:58px; padding:6px; background-     color:#FFF; "&gt;
   &lt;?php echo $paginationDisplay; ?&gt;
   &lt;/div&gt;&lt;/p&gt;
  
   &lt;input type="submit" value="Submit Quiz"&gt;&lt;/input&gt;
   &lt;/form&gt;`
  </code></pre>
  
  <p><code>testpage5.php</code> is the page where I verify the answers comparing value of <code>$_POST</code> to the correct answer from the database. I used <code>$_POST</code> to collect the values of the radio buttons.</p>