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.
Thank you in advance for any advice on this.
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.
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?
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".