How to Make a Quiz Need a Tutorial
I need some help, I am making a website and I need to make a quiz for it. So I have 100 or so questions and what I need the quiz to do is randomly take 10 questions from the 100 and then display them. The questions only have true/false or four possible answers and at the end of the quiz it must display the percentage of answers correct.
I need some help finding a web tutorial or book (I don't mind buying a good tutorial/book) on how to build a quiz which draws 10 questions randomly from the group of 100. I think I should use PHP to make the quiz but I don't mind using other things as long as they are compatible with iPhones.
Please note I have never done something like this before so I'm sorry if I missed something out.
Thanks for any help.
First stop is Google of course, so what did you find there? Anything promising?
So many other questions ....
Do you have an existing website/webhost account already?
Do the 100 questions need to be changed on a regular basis?
Does the person taking the test need to login somehow?
You only need to display the results to the user ... nothing else?
When the user refreshes the page, they get a new set of 10 random questions?
What if they refresh the page on question #5?
What if the next set of questions has 2 or 3 of them the same as the previous test?
Is what you're doing a homework assignment for a school or class?
Fumigator I did do a Google search but didn't find anything good so I came here.
mlseim here are the answers to your questions:
I have made a very basic website before just using HTML and CSS
No I don't need to change the questions on a regular basis however I will add/remove questions from time to time.
No login required.
Only the user needs to see the results I don't need to log the results or anything.
If the user refreshes the page I don't mind if they get a new set of questions or the quiz does not reset which ever is easier.
It doesn't matter if there are 2 to 3 questions from the previous quiz.
Yes I am doing this for a school project but it is not getting marked/given a grade so it's not worth any credits/points this project is more of a project that I want to do for fun and learning.
Thanks for the replies again!
Edit: Also I thought that I better add in that I'm not looking for someone to write out all the code for me here because I know that would be completely unreasonable what I really just want is for someone to give me some guidance so I can find some tutorials or books which will help me make my website.
You can make it as simple as a plain text file (flat file database).
Create a text file called "questions.txt".
Each line is one question with the parts separated by pipes |
An Elephant is a|B|fish|mammal|reptile|bird
Question | correct answer | choice 1 | choice 2 .... etc
Use a Php script to open that file, put all lines into an array, shuffle the array, loop through the first 10 lines, explode each line by pipes and display the question.
Google all of those php terms. Find a fellow student who knows php to help you.
Thank you for the reply, at least I now know what to look for :)
|All times are GMT +1. The time now is 07:10 AM.|
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.