I'm trying to create a multiple choice question, giving the user 4 possible choices for the answer. I need these choices in the form of Radio buttons. Then I need to make it so the user cannot continue until they have selected the correct answer. Any incorrect or correct answer needs to be prompted on screen to the user (not an alert box) What would be the code for this?
I downloaded a source code for designing a online store that is written with php,but when I want to run it by wampserver it shows this error.I ran this project by easy php and again it had same error.
The error is :
Notice: Undefined index: catid in C:Program FilesEasyPHP-5.3.5.0wwwoutput_fns.php on line 77
function validate_form(theForm)
{
var radioSelected = false;
for (i = 0; i < theForm.q1.length; i++)
{
if (theForm.q1[i].checked)
radioSelected = true;
}
if (!radioSelected)
{
alert("Pls answer question No. 1");
return (false);
}
Write a program that asks the user to type 10 integers of an array. The program will then display either "the array is growing", "the array is decreasing", "the array is constant", or "the array is growing and decreasing."