Multiple choice question in php

hi there,
Have anybody ever developed a mcq in php where ur data is cming from mysql. i did some part of it but the problem is that i m using print command to show question and options and thus user can go and see this in view source of the page. I know that i am on the wrong track and that’s why i am looking for a kind soul’s blessing so that i can do my experiment done :slight_smile:.


where is the problem if the user is able to see the question and options in the sourcecode as well.
are u highliting the right option somehow?

could u give us an example of the html-source.

thnx for your reply. The problem is that i m fecthing the data from database (including questions and there answers) and saving it in js for further check once user submit the question. I am doing so because in this way i do not require a constant connection to my database or rather u can say that server load will not be that much. But in that way, if a user views the source code of that page, s/he will be able to see the correct answers too and I don’t want that.

for example u can visit on : … xample.php

here u will get a sample MCQ and if you view the source code u will see that they are checking the user answer with one particular number (look in the very first js function, function Goahead. Though i am not litterly doing the same thing but again the issue is same.

i don’t understand why checking on submit with js should create a lower server load.
or why a php check would requier a constant connection to the database.

i would live that js stuff away. and do it with php.
that would reduce the server traffic as well.

hmmmmmmmm… even i felt the same after posting that message. Well, i think today it will be done in that way only. Thnx for your precious :)

Sponsor our Newsletter | Privacy Policy | Terms of Service