how to write online quiz project code
<pre><code>$answers=array();
$rightanswer=array();
echo '&lt;form action="question_check.php" method="post"&gt;';
$result=mysql_query("select * from sual where sual_id='1'");

if(mysql_num_rows($result))
{
    $row=mysql_fetch_row($result);
{
$question_id=$row[0];
$question=$row[1];
$answers[0]=$row[2];
$answers[1]=$row[3];
$answers[2]=$row[4];
$rightanswer=$row[4];

$rand_keys=array_rand($answers,3);
$answer0=$answers[$rand_keys[0]];
$answer1=$answers[$rand_keys[1]];
$answer2=$answers[$rand_keys[2]];



echo "question:".$row[1]."&lt;br&gt;";
echo '&lt;input type="radio" value="'.$answer0.'"&gt;'.$answer0."&lt;br&gt;";
echo '&lt;input type="radio" value="'.$answer1.'"&gt;'.$answer1."&lt;br&gt;";
echo '&lt;input type="radio" value="'.$answer2.'"&gt;'.$answer2."&lt;br&gt;";
echo '&lt;input type=hidden value="'.$rightanswer.'"&gt;';
echo '&lt;input type="submit" value="answer"&gt;';echo '&lt;input type="reset" value="sil"&gt;';
}

}
echo "&lt;/form&gt;";
</code></pre>

<p>i want to create online exam project.but there is a problem.i write question_check.php page but it isnt working,how should i write it. code above is my index.php...problem is i dont know exactly how to compare my selected answer with right answer in the database..pls help me<code>enter code here</code></p>
