Hello people i need some help regarding making a quiz website . I am having problem with the admin part. Requirements are:
define the number of questions
the answers to that question
the question is , how can i dynamically generate the quiz page with questions and its choices ?
php quiz website
Started by ahmed, Jun 09 2010 01:49 AM
3 replies to this topic
#1
Posted 09 June 2010 - 01:49 AM
|
|
|
#2
Posted 09 June 2010 - 07:42 AM
The easiest way is to store them in a database.
#3
Posted 09 June 2010 - 05:25 PM
yes but the problem comes when we want to show the user the quiz and then get its answers back.
I have saved all the questions that the admin adds in the database , and even showed to user but how do i get back answers?cause i don't know how many questions there are , how will i get the naming of the radio buttons?
I have saved all the questions that the admin adds in the database , and even showed to user but how do i get back answers?cause i don't know how many questions there are , how will i get the naming of the radio buttons?
#4
Posted 10 June 2010 - 11:05 AM
just loop through the result and display each result (on a query based on the question's id.) name the radiobuttons as "Q".$questionid if you have more than one question per page, otherwise, it doesn't matter, set the value of the button to the answers id
__________________________________________
I study Information Systems at Karlstad University when I'm not on CodeCall
I study Information Systems at Karlstad University when I'm not on CodeCall


Sign In
Create Account


Back to top









