Answered
PHP IF statement for a dynamic quiz
I'm making a dynamic quiz maker, so a person puts all the
questions, options and the answer and it is stored in a database
then echoe'd to a different user. I'm having some trouble with
making an answer equal to the one stored in the database, I've
never done IF statements before so donno if the syntax is quite
right. I'm trying to get it to do this:
<?php if ($Q1 == "echo $row_Recordset1['Answer']")
$score=$score+1 ;
?>
So if the answer specified on the page is equal to that stored in my database then increase the score by one.
Any help would be great
<?php if ($Q1 == "echo $row_Recordset1['Answer']")
$score=$score+1 ;
?>
So if the answer specified on the page is equal to that stored in my database then increase the score by one.
Any help would be great
