How to create PHP Quiz?

They have: 105 posts

Joined: Mar 2006

Would the following work?

Create 10 questions on one page, each with 3 answers which the user answers by clicking radio buttons.

At the end of the page the user clicks submit and process_answers.php calculates the score which will have a variable called score, and depending on which radio button the user clicked for the questions different values are added to the value of the score variable, which is presented to the user.

I can't find a simple quiz script on the Internet anywhere that can be easily modified. I litterally need a quiz script that consists of two files, one with the form for the questions and another that gets the score.

Greg K's picture

He has: 2,145 posts

Joined: Nov 2003

What will the results of the quiz be? keeping a tally for others to see or just for them to see end results.

Also do you mind if everytime someone goes there it is the same order of questions and same order fo given answers?

Lastly, is this a one time quiz, or do you plan on changing out the questions often?

-Greg

They have: 105 posts

Joined: Mar 2006

I just need the result of the quiz to be displayed to the user as a percentage (out of 10). Yes the questions can be the same and don't need to be changed often etc I need a basic quiz template.

I have a basic login system and want to allow users to take a quiz, I'm planning on submitting the score out of 10 in a form which will then be added to the database but for now I need a basic quiz.

Do you know where I can find one? Wink

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.