Probably a silly question, but I’m new to all this.
I am creating a basic quiz program in PHP, I want to have a MySQL database cantoning a table for each quiz, each table needs to have the same headings (Question, 1st 2nd 3rd and 4th multiple choice answer, and correct answer). Each table will then contain how ever many questions are in that particular quiz.
I am using PHPMyAdmin running on WAMP Server.
I am not sure if that’s the most efficient way to do it, but I have no other ideas, I’m very open to suggestions 🙂
My question is: How can I automatically create more tables within that database with these same headings, so the user can easily create new quizzes.
I am then going to go on to link this with my PHP code, and make a nice user interface for the users to create and do quizzes.
I would be so grateful to any answers, and welcome suggestions. Sorry I made this question quite long. Thanks again in advance 🙂 xx
A far more flexible design would be to have 3 tables;
Which this, you’re free to have as many quizzes you want, each having as many questions as it wants, and each question has as many (or few) possible answers.