I asked random question to student & stored his answers using his session id into mysql & than extracted the same way. I used Order By RAND() function in my query while asking the question
$query = "SELECT * FROM question ORDER BY RAND() LIMIT 0,1";
But Now I Want to Store answers in an arranged sequence for such purpose i can use Q_ID but i don't want to show q_id to user. So how can i store q_id into another table without showing it to user. Secondly i want to show correct answers to my students too.
but i really don't know how to tackle these thing :(
query for storing answers
$order= "INSERT INTO radio (Option1,Option2,Option3,user) VALUES ('".$Option['Option1']."','".$Option['Option2']."','".$Option['Option3']."','".session_id()."')";
Query For Extracting Data From mysql
$qry=mysql_query("SELECT * FROM radio where user='".session_id()."'", $con);
See Question&Answers more detail:os