Basic PHP Scripting

Due: 11:00pm, Thursday, September 15, 2022

Description

Complete the PHP program named project1.php to determine whether a donor’s blood type is compatible with a recipient’s blood type. The program should prompt the user for a donor blood type, then prompt the user for a recipient blood type and print out one of the following four lines exactly:

Valid blood types are: O-, O+, A-, A+, B-, B+, AB-, and AB+.

Note: use the readline function to prompt the user for input.

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/project1-handout

You can copy a directory with the cp -r command.

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

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

    ~schwesin/bin/submit csc242 project1

Grading Criteria

Note: If the code has syntax errors or does not execute properly, 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.

Appendix