Click here to Skip to main content
14,733,542 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
how can I use php to display question stored in mysql database and choose the right answer for it and give grade if the answer is right and store it back in mysql database (sorry I don't speak English very well)
Updated 13-Dec-15 9:23am
Suvendu Shekhar Giri 13-Dec-15 14:13pm
Where you are stuck?
What have you tried so far?
mohammed nasyia 13-Dec-15 14:44pm
i have created database for my questions
===Database test

== Table structure for table question

== Dumping data for table question

|10|how we define variables in php language ?|#s|$S|$s
== Table structure for table question
and i have this code for search and displaying data but i don't know if it's useful

while($row = mysql_fetch_array($query)){
$id = $row['id'];
$question = $row['question'];
$ans1 = $row['ans1'];
$ans2 = $row['ans2'];

echo"$question <br>";
echo"<input type='radio' value='A'>$ans1<br> ";
echo"<input type='radio' value='B'>$ans2 ";


} else{
echo " لا توجد نتيجة ";

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900