Homework Assignment #10 (PHP Form Validation)

In this lab, you will create a web page with a form that will be processed using PHP. The guidelines are the same as in Lab #2, and you can re-implement the same thing here as you did there. Your page must have at least two text input fields, one intended for a text input and one for a numerical input. There must also be a submit button, and when the user presses the submit button, the script should do something using both inputs, and one of the inputs should be modified in some way before being returned. The catch is that all of your inputs must be validated. This means that the script must require that both entries be filled out and that the numerical input only contains a number (Chrome does this automatically if you set the type to be "number", but your script must double check anyway because not everyone uses Chrome). Also, your script must use some kind of filter (like we did in today's lecture) to protect the script in case the user enters in HTML tags. Your script should also make sure that the user didn't leave any of the fields blank.

When you've completed the assignment, please send me an e-mail with a link to the page.

This assignment is due Wednesday, July 9th before class.