Using your text editor, create a file called: grade-quiz-cg3xaa.php (use your account number!) Use Notepad++ (or TACO on the Mac) , not Wordpad!
The file should also be in your public_html directory. You will be testing it from the server. So, if you are working from home, be sure to FTP (use FileZilla or FuGu) (upload) the file everytime it is modified.



You should see your Part 1 of the assignment appear. If you were to take the quiz at this point, nothing should happen.
If you have gotten this far, then continue. If you have not gotten this far, then look to make sure that you have the correct file names (both in your html document and your php document.)
We're giving you the PHP code to enter. However, it is possible to get syntax errors because you've mis-entered something; this will keep your .php script from working. So consider doing the following:
echo "Made it all the way through <br />" ;That way, each time you test your script, you should see that statement (Made it all the way through) appear. If not, you likely have a syntax error, and most likely it is in the code you just added.
tail /software/common/apache/logs/error_log

$_POST[.....] is a PHP superglobal variable. The $_POST variable is where PHP stores all of the variables and values sent via the post method (see red lines below.). (The same applies to the $_GET superglobal variable -- which we are not using in this assignment.)
$_POST[ ] is an array, and the index is the name value associated with the input element (see yellow and green lines in figure below.)
The purple line shows the relationship to the PHP filename called by the action attribute of the form element of the html document and the PHP document.

First, for each question, one needs to figure out which radio button was selected. Consider the logic depicted in the figure below:


Once you have coded a switch statement for each of the questions, test your program to make sure that everything is working.
Once it is, then you are ready to tackle
part 3.