Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6206171
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T05:24:17+00:00 2026-05-24T05:24:17+00:00

I am interested in creating an application that can create quizzes, by suplying a

  • 0

I am interested in creating an application that can create quizzes, by suplying a quiz name, questions and 4 possible answers (1 correct, 3 incorrect). These quizzes will be accessible to the user and certain user types can edit them, while others can answer them.

Should I separate the questions and answers in different tables? Or should I just have a question table, with 4 fields for the answers?

If you have done this before, what other considerations should I take when creating this quiz generator?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T05:24:18+00:00Added an answer on May 24, 2026 at 5:24 am

    I’d say your relationships should be something like:

    User hasMany Quiz
    Quiz hasMany Question
    Question hasMany Answer
    
    Quiz belongsTo User
    Question belongsTo Quiz
    Answer belongsTo Question
    

    This would allow you to have more than 4 answers, if the requirements ever changed.

    Things to consider perhaps:

    How are you going to test if the answer is correct? Boolean, string comparison?

    What if a given question asks for something that you couldn’t easily show in a “yes/no” or “true/false” situation? This problem may never arise if you want to limit to multiple choice, but it could.

    How are you going to grade the quiz? Another table to store statistics about a users quiz history? Or is it a one off, using sessions?

    using save all

    // view
    echo $this->Form->create('Question', array('action'=>'add'));
    echo $this->Form->input('Question.name', array('label'=>'Question name'));
    echo $this->Form->input('Answer.0.title', array('label'=>'Answer'));
    // etc
    
    // add method
    if (!empty($this->data)) {
        $this->Question->saveAll($this->data, array('validate'=>'first'));
    }
    

    should be all you need ~

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am interested in creating a simple web application that will take in user
I'm interested in creating commands that are available from anywhere in my WPF application.
I am interested in creating a Google plus application.But I come to know that
I'm interested in creating a desktop application composed of modules such that the source
I'm interested in creating a game that uses fractal maps for more realistic geography.
I'm interested in creating a plugin that does this simple task: Steps 1. User
I am interested in creating a web app that uses JSP , Servlets and
I'm interested in creating a system where the user can define the steps in
I'm creating a web application that allows users to make changes through Javascript. There
I'm creating a multi-user/company web application in PHP & MySQL. I'm interested to know

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.