I am using PHP MYSQL to generate a small multi page quiz. I am able to display the questions and the multiple choice answers as radio button choices(thanks to help from Stackoverflow). The problem I am running into is – is there a way to trigger an action as soon as a user clicks on a radio button? If the user has selected a wrong answer, I want to give immediate feedback and say the answer is wrong and why it is wrong. If the user has selected a correct answer, I want to display correct answer.
I have looked at $_GET,$_POST and $_REQUEST but all require the answers to be “Submit”ted for the process to begin in PHP. I want the action to begin (using PHP source code) as soon as the user clicks a radio button.
Note: I have looked at several questions here that seem to utilize jQuery for the above. Is it possible to do without jQuery or Javascript?
Thanks for your help.
Yes it is possible and to use jQuery is the best solution.
http://api.jquery.com/jQuery.ajax/