hi guys
i have a great problem on my hands here
i am developing a online quiz system for my college
i put the questions in a database
i call them ordered by id using a select statement
ie : "select * from questions order by id"
and after they have pressed submit i evaluate the answers as follows
/**********************************************************
$list_questions = "select * from questions order by id";
$display = mysql_query($list_questions,$connectparam);
$score = 0;
$total = mysql_num_rows($display);
while ($result = mysql_fetch_array($display)) {
$answer = $result["answer"];
$q = $result["q"];
$star = $result["star"];
if ($$q == $answer) {
$score++;
if ($star==1) {
$score=$score+5;
}
}
if ($star==1) {
$total=$total+5;
}
**********************************************************/
this works fine
the database is as follows
id | q | question | option1 | option2 | option3 | option4 | answer | star
but my sir told today that since 20 ppl will take part simultaneuosly each time the quiz is help he want all of them to get the questions in random order , not the same order each time
so i thought i could use the rand function
but its ok when i display the question
but when i want to evaluate i must call select for all questions again and this time the questions order is different agains
so i cant evaluate the answers
so any of you guys have a solution to my problem
please help me
thanks