title: How to process quiz in PHP after users have selected their choices
body: <p>I am designing a quiz application, and i am using a while loop to load the quiz questions and options from the database but i don't really know how to handle the submission of the quiz. I mean how to display the options the users have selected.</p>
  
  <p>My question is how to handle the choices selected by the users?</p>
  
  <p>Here is my code for displaying the quiz questions and options:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;?php $response = mysql_query("SELECT * FROM iq_questions ORDER BY RAND()"); ?&gt;
  &lt;form method='POST' id='quiz_form'&gt;
   &lt;?php 
    $counter = 0;
    while($result = mysql_fetch_array($response)){
    $counter = $counter + 1;
   ?&gt;
     &lt;div id="question_&lt;?php echo $result['question_id'];?&gt;" class='questions'&gt;
   &lt;h4 id="question_&lt;?php echo $result['question_id'];?&gt;"&gt;&lt;?php echo $counter.".  ".$result['question_name'];?&gt;&lt;/h4&gt;
   &lt;div class='align'&gt;
      &lt;input type="radio" value="1" id='radio1_&lt;?php echo $result['question_id'];?&gt;' name='&lt;?php echo $result['question_id'];?&gt;'&gt;
      &lt;label id='ans1_&lt;?php echo $result['question_id'];?&gt;' for='1'&gt;A.  &lt;?php echo $result['choice1'];?&gt;&lt;/label&gt;&lt;br/&gt;
      &lt;input type="radio" value="2" id='radio2_&lt;?php echo $result['question_id'];?&gt;' name='&lt;?php echo $result['question_id'];?&gt;'&gt;
      &lt;label id='ans2_&lt;?php echo $result['question_id'];?&gt;' for='1'&gt;B.  &lt;?php echo $result['choice2'];?&gt;&lt;/label&gt;&lt;br/&gt;
      &lt;input type="radio" value="3" id='radio3_&lt;?php echo $result['question_id'];?&gt;' name='&lt;?php echo $result['question_id'];?&gt;'&gt;
      &lt;label id='ans3_&lt;?php echo $result['question_id'];?&gt;' for='1'&gt;C.  &lt;?php echo $result['choice3'];?&gt;&lt;/label&gt;
      &lt;input type="radio" checked='checked' value="5" style='display:none' id='radio4_&lt;?php echo $result['question_id'];?&gt;' name='&lt;?php echo $result['question_id'];?&gt;'&gt;
   &lt;/div&gt;&lt;br/&gt;
     &lt;/div&gt;
  &lt;?php } ?&gt;
  &lt;input type="button" id='next&lt;?php echo $result['question_id'];?&gt;' value='Next!' name='question' class='btn btn-success'/&gt;
  &lt;/form&gt; </code></pre>
  </div>
  </div>
  </p>
  
  <p>Please i really need help. Thank you.</p>