Home › Forums › Back End › How to get quiz results emailed to me and the user? › Re: How to get quiz results emailed to me and the user?
August 9, 2012 at 7:58 pm
#107633
chicago123
Member
This is the code for the grade.php page, I don’t know if I’ll need it. BTW I’m using Dreamweaver CS5.5.
PHP Quiz
TRIVIA #1
$answer1 = $_POST;
$answer2 = $_POST;
$answer3 = $_POST;
$answer4 = $_POST;
$answer5 = $_POST;
$totalCorrect = 0;
if ($answer1 == "A") { $totalCorrect++; }
if ($answer2 == "C") { $totalCorrect++; }
if ($answer3 == "B") { $totalCorrect++; }
if ($answer4 == "A") { $totalCorrect++; }
if ($answer5 == "C") { $totalCorrect++; }
echo "$totalCorrect / 5 correct";
echo "You earned $totalCorrect 0 SpongeCash";
?>