Checking Radio Button for "Right Answer" and saving data to variable before posting?
<p>I need a little extra help to figure out an issue I'm having. You can see a great deal of detail about it here: <a href="http://stackoverflow.com/questions/2134056/checking-correct-answer-and-submitting-form">http://stackoverflow.com/questions/2134056/checking-correct-answer-and-submitting-form</a>, but here's the basics.</p>

<ol>
<li>Project is a just-for-fun quiz composed of 10 question pages and 1 result page.</li>
<li>Submitting a Form composed of 3
Radio buttons, 1 is correct.</li>
<li>Security is not an issue.</li>
<li>Cannot use JavaScript, all PHP/HTML/CSS (mobile browsers and limitations etc.)</li>
<li>Form action takes the user to the next page.</li>
</ol>

<p>How can I select the correct answer (can be hardcoded) and how can I save the number of right answers as a user continues through the pages?</p>

<pre><code>&lt;?php 
    /* Gets current correct answer Count */ 
    $answer_count = $_GET["p"]; 

    /* checks to see if the submitted answer is the same as the correct answer */
    if ($_POST["submitted-answer"] == "correct-answer") {
        $answer_count++;
    }
?&gt;
</code></pre>

<p>The form HTML:</p>

<pre><code>&lt;form name="quiz" action="" method="POST"&gt;
&lt;label for="o1"&gt;&lt;input type="radio" name="grp" id="o1" value="o1"&gt; Label 1&lt;/label&gt;
&lt;label for="o2"&gt;&lt;input type="radio" name="grp" id="o2" value="o2"&gt; Label 2&lt;/label&gt;
&lt;label for="o3"&gt;&lt;input type="radio" name="grp" id="o3" value="o3"&gt; Label 3&lt;/label&gt;
&lt;input type="submit" value="Next Question" class="btn"&gt;
&lt;/form&gt;
</code></pre>

<p>The values of my radio buttons are not necessary at the moment. Can I use something utilizing value="wrong" on the two wrong answers and value="right" on the correct one?</p>
