How do I check the selected radio button value with the value stored in a database field? Code is below:
index.php:
dfdfdffdfdfdfdf
question.php
$_POST['answer'];
$totalCorrect = 0;
if ($_POST == 'CorrectAnswer') { $totalCorrect++;}
echo "$totalCorrect questions correct";
I want to pass the answer chosen to check it with the database to see if it matches the value of CorrectAnswer
and edit the score accordingly.