Start-up guidance

Hello,

I have a client who has asked me to create a module for his CMS system, that allows him to create a 1-question quiz with 3 multiple answers (pretty simple for you guys I guess).

So far I have created the form and also a script that checks for the right answer and then put data into MySql according to what answer was chosen.

I am kinda stuck at the moment as I can’t figure out how i can make him create a new quiz? Furthermore it has to possible for him to activate/deactivate a quiz from time to time? (For this I will create a cell in the mysql table with the value either 1=active or 2=deactivate. Any better idea to solve that problem?

Can you give my any suggestions of how you would manage this?

Fairly easy to do.

First, in your database table, just create the needed fields.
Something like: Status, Question, Answer1, Answer2, Answer3

You would have two pages. One for the people selecting the answers and one for him to change them.
(He would log into a hidden page that would have the fields for the four items above.)

Then, he can change the status, questions and answers. When he submits it, it will be saved into the database.
If he changes the “Status” to active, people can make a selection. You would have to alter the page that displays the question and answers so that it first checks for the value of “Status”. If “Status” is disabled, you would have to display a message stating so, if not, then show the question/answers.

All of this would be separate from the results that you are saving to the database.

Hope these ideas help you get started… Good luck!

Sponsor our Newsletter | Privacy Policy | Terms of Service