So my objective sounds simple, I need to make a db driven multiple choice quiz
CMS to add into my project. I need to be able to create quizzes by category, add 10 questions per quiz, and 4 questions with 1 answer. I’ve been troubled in 2 areas.
-
Database structure. How can I structure my database so that I can do this? eg, a table for each questions, question_answers, and quizzes?
-
After the users takes the quiz, I want to grab the score and store it into its own table. I know how to put the score into the database, but how would I display the quiz, with the corresponding question, with the corresponding answers, and the correct answer with the right radio button?
It’s very tricky to me, but maybe not to some of you geniuses out there.
Best regards,
Sean
Clicked this table structure for you. The foreign key constraints are optional.
And for storing the test, users have taken:
Some sample data to play around: