Create a text file that has lines with student names and addresses such as the following:
Joe Smith 1553 Pleasant Drive
Jane Doe 888 Harkness Ave
Nadine Tuley 812 University Ave
Your text file is NOT required to follow the format above exactly, and you probably don’t want to follow that format. The only requirement is that each lines contains the information for one person.
Create an HTML page with a form that will work with the data in this text file. The form should have text fields for a name and also an address. It should also have a way of selecting one of 2 options. The form will either be used to look up the address of a person. In this case, only the name field is required to be filled out. The other option is to add a person to the file. In this case both fields need to be filled out.
Create a PHP page that will be called when this form is submitted. This page must determine which option the user wants to do. If they want to look up someone, the script should get their name from the field and use that name to find them in the file and pull their address. It should build a “nicely formatted” page that includes the person’s address. If they want to add someone, the script should first verify that they aren’t already in the file and if they are not, then add them. In this case it should build a “nicely formatted” page that gives the user an appropriate message.