How to get results from quiz
Posted: Fri May 09, 2008 12:21 pm
I have this car quiz, but I don't know how to get the results of the many people who will most likely take the quiz (haha, it'll probably be just me taking the quiz). I will post the code here:
So...the quiz is fine except for the fact that I don't get the answers that people enter. How can I get those send to me or compiled in some place? A leaderboard would also be cool, but that can come later.
Thanks!
So...the quiz is fine except for the fact that I don't get the answers that people enter. How can I get those send to me or compiled in some place? A leaderboard would also be cool, but that can come later.
Thanks!
Code: Select all
<?php
$qid = "Car Quiz";
?>
<html>
<head>
<title><? echo " $qid"; ?></title>
</head>
<body>
<p><h3><? echo " $qid"; ?></h3></p>
<form action="results.php" method="post">
<p>Username: <input type="text" name="name"></p>
<p>1.) What car is this?<br>
<p><img src="http://www.alexbrew.com/enzo.jpg"></P>
<input type="radio" name="q1" value="Answer 1"> Ferrari Enzo<br>
<input type="radio" name="q1" value="Answer 2"> Ferrari F50</p>
<p>2.) What car is this?<br>
<p><img src="http://www.alexbrew.com/bmw_135i.jpg"></P>
<input type="radio" name="q2" value="Answer1"> BMW 540i<br>
<input type="radio" name="q2" value="Answer2"> BMW 135i</p>
<p>3.) What car is this?<br>
<p><img src="http://www.alexbrew.com/bmw_beater.jpg"></P>
<input type="radio" name="q3" value="Answer1"> Chevy Silverado<br>
<input type="radio" name="q3" value="Answer"> BMW Beater</p>
<p>4.) What car is this?<br>
<p><img src="http://www.alexbrew.com/ford_focus.jpg"></P>
<input type="radio" name="q4" value="Answer1"> Mercedes E350<br>
<input type="radio" name="q4" value="Answer2"> Ford Focus</p>
<p>5.) Question number five is?<br>
<p><img src="http://www.alexbrew.com/Hummer.jpg"></P>
<input type="radio" name="q5" value="Answer1"> Hummer H2<br>
<input type="radio" name="q5" value="Answer2"> Toyota Prius</p>
<p><input type="submit" name="submit" value="Submit Quiz"></p>
<input type="hidden" name="qp" value="quiz00.php">
</form>
</body>
</html>