Iam making MCQ script through form but iam stuck with an error. I want the script to make sure/validate if the user has left options blank or haven’t choose any answer but dont know how to do this.Here is my code.
[php]<?php
//Question1//
$question1 = $_GET[‘q1a’];
if ($question1 == ‘a’)
echo “Your First Answer is correct”;
else
echo “Your First Answer is Incorrect”;
echo “
”;
//Question2//
$question2 = $_GET[‘q2a’];
if ($question2 == ‘a1’)
echo “Your Second Answer is Correct”;
else
echo “Your Second Answer is InCorrect”;
?>[/php]
[code]
1 - Which is the most visited Website in the year 2010 according to a survey?Amazon
Yahoo
2 - What does PHP stand for ?
Private Home Page
PHP: Hypertext Preprocessor
Personal Hypertext Processor
Personal Home Page
[/code]