hello everybody,
I'm making a quiz application and right now i'm displaying all the questions from the table.To make it more attractive, I would like to display only one question at a time and click next button for the other questions.
Should i simpliy modify my sql st or anything else??
How can i do this one??
One more question:
Is that a possible to put a time bar(something which we see in flash), like say if the user does'nt answer a question say 20 sec's, it has to skip to the next question.
Many thanks
I'm making a quiz application and right now i'm displaying all the questions from the table.To make it more attractive, I would like to display only one question at a time and click next button for the other questions.
Should i simpliy modify my sql st or anything else??
How can i do this one??
One more question:
Is that a possible to put a time bar(something which we see in flash), like say if the user does'nt answer a question say 20 sec's, it has to skip to the next question.
Many thanks
PHP-Code:
include("contentdb.php");
$display = mysql_query("SELECT * FROM $table ORDER BY id",$db);
if (!$submit) {
echo "<form method=post action=$PHP_SELF>";
echo "<table border=2>";
while ($row = mysql_fetch_array($display)) {
$id = $row["id"];
$question = $row["question"];
$opt1 = $row["opt1"];
$opt2 = $row["opt2"];
$opt3 = $row["opt3"];
$answer = $row["answer"];
echo "<tr>";
echo "<td rowspan=4 background=schumi.jpg></td>";
echo "<td><b>$question</b></td></tr>";
echo "<tr><td><input type=radio name=q$id value=\"$opt1\">$opt1</td></tr>";
echo "<tr><td><input type=radio name=q$id value=\"$opt2\">$opt2</td></tr>";
echo "<tr><td><input type=radio name=q$id value=\"$opt3\">$opt3</td></tr>";
}
echo "</table>";
echo "<input type='submit' value='See how you did' name='submit'>";
echo "</form>";
}
Kommentar