IDS 313 Fall 2021 Assignment 4 Due Monday 11/29/2021 50 points Instructions

IDS 313 Fall 2021

Assignment 4

Due Monday 11/29/2021

50 points

Instructions

Submission Guidelines

This assignment may be submitted for full credit until Monday, November 29th at 11:59pm. Late submissions will be accepted for four days past the regular submission deadline but will receive a 15pt penalty. Submit your work as a zipped file (.zip) containing the files listed below. It is strongly recommended to submit your assignment early, in case problems arise with the submission process.

Assignment

For this assignment, you will write two PHP files. Put these files together in a folder, then zip them together and upload them to Blackboard. In Windows, you can zip files by selecting them, right-clicking, and choosing “send to -> compressed (zipped) folder”.

For both files, you should use the following parameters:

Server name: “localhost”

User name: “user1”

Password: “secret123”

Database name: “database”

Your first file should be named with your NetId and the letter ‘a’. For example, if your NetId is jsmith1, this file should be named “jsmith1a.php”.

The file should enter the following records into the table Employees:

lastname: Johnson, firstname: Fred, department: ACCT

lastname: Sanchez, firstname: Betty, department: FIN

lastname: Wu, firstname: John, department: MKTG

lastname: Johnson, firstname: Susie, department, FIN

lastname: Fiori, firstname: Maria, department: MKTG

lastname: Patel, firstname: Sandeep, department: ACCT

For each record, a confirmation message should be displayed including the record’s fields, i.e., “new record created for Fred Johnson (ACCT)”. You might try using a function that accepts the requisite parameters and prints them. More details at:
PHP Functions (w3schools.com)

Your second file should be named with your NetId and the letter ‘b’. For example, if your NetId is jsmith1, this file should be named “jsmith1b.php”.

The file should run the following queries on the table Employees to display:

All records where the department is FIN

All records where the lastname is Johnson or the department is ACCT

All records where the lastname is Fiori and the department is MKTG

Each record should display the lastname, firstname, and department fields

Each set of records should be preceded by the description of the query. The three sets of query results should be separated by a blank line of text.

Evaluation

Your assignment will be graded according to whether all the required elements are present and in the correct formats and all required functionalities are operable.