\n" . 'Hint: try setting url to ?op=ques-X&ans=Y'); } else { $op = $_GET['op']; } // check ans if(!isset($_GET['ans'])) { die('ERROR: no ans set'); } else { $ans = $_GET['ans']; } // begin logic -- ques-1 if($op == 'ques-1') { // correct answer for form is b if($ans == 'b') echo 'Correct ans for ' . $op; else die('ERROR: invalid ans for ' . $op); } else { // logic for no op set die('ERROR: invalid op'); } ?>