Creating a quiz... gotta make it simple and fast!

Well, so I am n00b at javascript and gotta code a multiple choice quiz for a site. I am good at PHP and MySQL, but I want to use something else this time… :wink:

This quiz won’t be any “correct answer” one, one can choose any option for a question. The thing is next question depends on the option you have chosen now… :slight_smile: so, after a series of questions, we decide something based on all responses given before… :smiley:

So, is using Javascript a good idea? Can we use AJAX for this purpose?

The question is which option will make it easy and I want a pointer which I can reference and start writing the code… using PHP would be fast since I know it, but I am thinking of learning something in the process, that’s why… :slight_smile:

1 Like

You already know PHP, but you’re new to Javascript. So it will surely be faster to do the job in PHP. But if your main interest with this project is as a training exercise for Javascript, then that would be OK as well. From what you’ve told us, it sounds like a fairly simple bit of procedural code, which should be easily do-able in either language.

One possible problem with Javascript is that it won’t be as secure as PHP for this particular job. In other words, it would be theoretically possible for a knowledgeable person to cheat, by studying the JS code. That might not be an issue, but it’s worth keeping in mind.

As for Ajax, you certainly don’t need to use that for the project you’ve described. But, again, if you’re interested in using this project to learn Ajax, but all means give it a go.

Mike

Yes, that sure is an issue with Javascript quizzes, but I guess like you said that won’t be a problem as this quiz has nothing like correct answer… but it could be a problem in the sense that any n00b can copy the code, and use it as their own…

Thanks for the help… I guess I will go with PHP… :slight_smile: