title: Multiple choice in PHP
body: <p>How can i save all the inputs(question, choices, answers) in the database?
  I cant save the correct answer on the database. how can i get the chosen value, which is selected through the radio button? Or is there any other?</p>
  
  <pre><code>&lt;form action="test2.php" method="post"&gt;
  &lt;?php
  if($numMC &gt; 0)
      {
  
  echo "&lt;b&gt;"."MULTIPLE CHOICE QUESTIONS: Enter them below followed by their correct answer."."&lt;/b&gt;";
          echo "&lt;br&gt;"; 
  
          for ($j=1; $j&lt;=$numMC; $j++)
              {?&gt; 
  &lt;p&gt;&lt;textarea name="question[&lt;?php echo $j; ?&gt;]" rows=3 cols=90&gt;question[&lt;?php echo $j; ?&gt;]&lt;/textarea&gt;&lt;/p&gt;
              &lt;?php for($k=1;$k&lt;=$numchoices;$k++)
                  {
                  echo $k; ?&gt;
                  &lt;input type="radio" name="right[&lt;?php echo $j; ?&gt;]"&gt;
                  &lt;input type="text" name="choice[&lt;?php echo $j; ?&gt;][&lt;?php echo $k; ?&gt;]" value="choice[&lt;?php echo $j; ?&gt;][&lt;?php echo $k; ?&gt;]"&gt;&lt;br /&gt;
  &lt;?php               }
  
                  echo "&lt;br&gt;"."&lt;br&gt;";
              }
  
      } ?&gt;
  
  &lt;input type="submit"&gt;     
  </code></pre>
  
  <p>how will i determine which radio button is selected and how will i get the value of the radio button that is selected?</p>