JavaScript for quiz?

I have a MySQL database table with multiple choice questions and want to add a quiz to an existing website. One round of the quiz would mean pulling 20 random questions from a selected category and answer the questions one by one. The faster a correct answer is given, the more points you get. To prevent cheating I don’t want the correct answer to be revealed in the page source code.

Any ideas on how I can do this the easy way. My plan is to use JavaScript for the Quiz. To check the answers without revealing the correct answer in the page source code I thought AJAX could be a solution but I have never used AJAX. I have built the site using PHP and MySQL and a little JavaScript but I’m a beginner at this so before I before I start building the quiz I’m looking for some advice on what technique to use.

Thank you in advance for any advice on this.

Hy,
Another solution, if the annswers are shorts, is to add the answer with php encripted md5, then, with JS functions for MD5, will encript the user’s answer and make comparations with the one from php.
You can find on the net “MD5 JavaScript functions”.

Thank you for your reply, but I don’t understand how I can have the answers shown as multiple choice alternatives if they are encrypted?

The ideea is to make a JavaScript Array with the correct answers, encripted each correct answer.
Then, when the user adds an answer, the JS encripts it and checks in that Array if there is the same encripted answer.
Or, if this is not a solution, try with Ajax, maybe is better to learn Ajax too. Look for “Free Ajax Course”.