PHP Quiz Source Code

Just a quick heads up to let you know that you can now download all of the source code for the PHP Quiz. This might make it easier for you to get up and running without trying to follow all of the series. I’ve also included the small amount of JavaScript too.

You can download it here PHP Quiz (11.21 KB) . I’ll also put a download link at the top of each post in the series.

Cheers,
ElanMan

Feed IconFollow me on Twitter





8 Responses to “PHP Quiz Source Code”

  1. Hello. Thanks for your good work. I have question. How to display users choice in the end of quiz? Right now script displays only correct answers. I wont to display in red color my answers, and in blue correct answers. How can i do that?

    And i have second question. How to display more then one quiz? I wont to have more then one quiz in my site. Right now i have leaderboard only for one quiz, and i wont to have for more. Please help my with that.

  2. Hi Ahmed,
    the quiz should display the user’s choices at the end on the results.php page. Have a look at the working example.
    As for having multiple quizes on a site, I’m currently working on a new quiz script that will make this sort of thing much easier to achieve and will alsao work with mysql, which a lot of people have requested.
    Stay tuned :)

  3. hehe by (Woops!) on results page :D I didn’t saw that before. So that problem no longer exist. But i have another question. When you exactly planning to release that new script?

  4. I was looking for quiz and i am happy i havea found exactly what i wanted here))
    i was testing the script and founded that there is something that i would like to change in it. i need to see in Acronym quiz this:
    1. correct answers are always first in answers page.this is very bad for quiz users .i want to select the right answer by myself and change the order as i wish .
    i’ve read you posts here and i couldn’t find enought information about how to make my Correct answer in different places.

    Question1?
    1.
    2.Correct
    3.
    4.

    Question2?
    1.
    2.
    3.
    4.Correct

    Question3?
    1.Correct
    2.
    3.
    4.

    the wrong answers work well.

    the second problem is that the number of question is 20 and i want it to be for example 11 the answers page is awfully wrong. is there something else to add or change?

    this is what i want so much and want you to ask for a help.i am ready to pay as much as it needs to.

  5. Hi bigfan :)
    The correct answer isn’t always listed first in the possible answers. Have you tried the online example? The correct answer should be randomly placed/shuffled.
    TBH, this quiz was just a simple demo to understand SimpleXML and was never meant to be a decent quiz app.
    To that end, I’m creating a simple, more robust quiz framework that I’ll publish asap which will work with MySQL instead of xml files.
    Thanks for your comments :)

  6. Hey bigfan, I’ve just taken the quiz and indeed the correct answer is always the first. Not sure why atm as it wasn’t like that originally. I’ve changed some of the online code a while back and have probably altered it.
    Have you downloaded the file? Chances are that that has the original code in it.
    Apologies :)

  7. Hey Ben.

    Still waiting for the revised version of the quiz sir!

    Any ETA?

  8. for my assigment ..i need simple quize code….so plz provid me code and how to connect with database…
    thank you!!!

Leave a Comment







XHTML: You can use the following tags in your comments: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">