HTML Forms

Due: 11:00pm, Thursday, October 27, 2022

Assignment Description

The project5-handout directory has three files: project5.php, style.css, and animals.csv. The animals.csv file is the output from the previous project. The project5.php file contains in incomplete HTML document containing a form.

You are to complete the project5.php to use PHP to read in the animals.csv file and produce an HTML table of its contents based on the form data. If “Class” is selected with an invalid value, then the document should include an error message with an HTML list of valid class values. Otherwise a table should be printed out containing only the rows where the search term matches the valid class. If “Status” is selected with an invalid value, then the document should include an error message with an HTML list of valid values. Otherwise a table should be printed out containing only the rows where the search term matches the valid status. The rows in the output table must be sorted first by total number of animals and second by animal name in alphabetic order.

Instructions

To start the assignment, login to your university Linux account and copy the assignment code to a location somewhere under your home directory. The assignment code is located at:

/export/home/public/schwesin/csc242/projects/project5-handout

You need to edit the project5.php file. Do not change the names of the file.

To submit your assignment, execute the following command from within your project5-handout directory:

    ~schwesin/bin/submit csc242 project5

Grading Criteria

Note: If the code has syntax errors or does not execute properly (this includes warnings from PHP interpreter), you will receive a failing grade for this assignment. If the submission includes material that was not covered in class and the material is not properly cited, then you will receive a failing grade for this assignment.