Jump to content

php quiz website

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
3 replies to this topic

#1
ahmed

ahmed

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 304 posts
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 ?

#2
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
The easiest way is to store them in a database.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#3
ahmed

ahmed

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 304 posts
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?

#4
Orjan

Orjan

    Writes binary right handed and hex left handed

  • Moderators
  • 3,299 posts
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