I have a database in which i have stored all MCQ questions with options and correct answer.
Now Im facing problem when generating an user interface for taking test..
There i cant write two questions at a time because i cant give name for radio buttons. Number of questions in the database is unknow apriori.
So now i thought of giving one question at a time to the participant and evaluate it and give another question.. but how can i display one question at a time??? Only after submitting answer to that particular question the next question should appear.. So how to solve this requirement??? Please some one do help me.....
Thanx in Advance....
Multiple Choice Question Evalutaion
Moderator: General Moderators
-
vidyabhushan
- Forum Newbie
- Posts: 16
- Joined: Mon Oct 20, 2008 4:58 pm
Re: Multiple Choice Question Evalutaion
Why can't you give names to radiobuttons?
-
vidyabhushan
- Forum Newbie
- Posts: 16
- Joined: Mon Oct 20, 2008 4:58 pm
Re: Multiple Choice Question Evalutaion
Number of questions in the data base is not known.
Re: Multiple Choice Question Evalutaion
Well, that's one of the main reasons of using PHP. To get a dynamic solution.
How have you structured the db table so far?
How have you structured the db table so far?
-
vidyabhushan
- Forum Newbie
- Posts: 16
- Joined: Mon Oct 20, 2008 4:58 pm
Re: Multiple Choice Question Evalutaion
the question table structure is like this
question_no | question | option1 | option2 | option3 | option4 | answer | time_rqrd | marks |
question_no | question | option1 | option2 | option3 | option4 | answer | time_rqrd | marks |
Re: Multiple Choice Question Evalutaion
So, if you wanted all questions on one page. You can extract them from the database and sort by question_no. Looping through the options to see how many radiobuttons you need to display.
If you still want to display one question at a time, there is a couple of ways you can go about that.
If you still want to display one question at a time, there is a couple of ways you can go about that.
-
vidyabhushan
- Forum Newbie
- Posts: 16
- Joined: Mon Oct 20, 2008 4:58 pm
Re: Multiple Choice Question Evalutaion
Please tell me how to display one question a time????
Re: Multiple Choice Question Evalutaion
Do you know HTML and PHP? No point of me writing the code for you. Show me some code after you've giving it a try and I'll help you.
First of you should make the html form and then start looking on mysql functions (if you are using mysql of course) on php.net.
First of you should make the html form and then start looking on mysql functions (if you are using mysql of course) on php.net.