Demonstrate your ability to instantiate classes from text files and then display the content. Instructions: You have been provided with a PHP fileā€¦ | Cheap Nursing Papers

Demonstrate your ability to instantiate classes from text files and then display the content. Instructions: You have been provided with a PHP file…

Demonstrate your ability to instantiate classes from text files and then display the content.

Instructions:

1. You have been provided with a PHP file (Chapter10-project03.php) that includes all the necessary markup. You have also been provided with two text files, customers.txt and orders.txt, that contain information on customers and their orders.

2. Define classes to encapsulate the data of a Customer and an Order. Each line in the file contains the following information: customer id, first name, last name, email, university, address, city, state, country, zip/postal, phone. Each line in the orders file contains the following data: order id, customer id, book ISBN, book title, book category.

3. Read the data in customers.txt and for each line in that file create new instance of Customer in an array, and then display the customer data in a table.

4. Each customer name must be a link back to Chapter10-project03.php but with the customer id data as a query string.

5. When the user clicks on the customer name (i.e., makes a request to the same page but with the customer id passed as a query string), then read the data in orders.txt into an array of Order objects, and then display any matching order data for that customer. Be sure to display a message when there is no order information

Test the page in the browser. Verify the correct orders are displayed for different customers. Also note that the customer name is displayed in the panel heading for the orders.

"Get 15% discount on your first 3 orders with us"
Use the following coupon
FIRST15

Order Now

Hi there! Click one of our representatives below and we will get back to you as soon as possible.

Chat with us on WhatsApp