Which checkbox is selected and assigning a value
<p>I am trying to create logic to see what checkbox is selected (of 5 possible checkboxes) and if it is selected assign it a value of 0. if it is not selected I was to assign it a value of 1. The proceeding code snippet highlight this but throws a parse error in my else statement and I cannot fighure out why.
    //Check to see what checkbox is marked for correct answer</p>

<pre><code>//Correct answer variables
$chkBox1 = 'unchecked';
$chkBox2 = 'unchecked';
$chkBox3 = 'unchecked';
$chkBox4 = 'unchecked';
$chkBox5 = 'unchecked';

if (isset($_POST['chkBox1'])) {

if ($chkBox1 == 'chkBox1Selected') {
$chkBox1 = '0';
                }
else{
$chkBox1 = '1';
}
}//End of chkBox1Selected logic
</code></pre>
