Answered step by step
Verified Expert Solution
Question
1 Approved Answer
This assumes you have created the practice database, with two tables, customers and orders, and also added customer functionality. Add additional customer order functionality to
This assumes you have created the practice database, with two tables, customers and orders, and also added customer functionality.
Add additional customer order functionality to your project.
After reading instructions, complete required steps.
Create a file called controllerslistorders.php This file should:
Define a function called listorders that retrieves all orders from the orders table and returns them as an array.
Load the viewslistorders.php file and pass the array of orders to it
Create a file called controllersaddorder.php This file should:
Define a function called addorder that retrieves the order data from the POST request and inserts it into the orders table.
Redirect the user to the listorders.php
Create a file called viewslistorders.php This file should:
Loop through the array of orders passed to it and display their information in a table.
Create a file called viewsaddorder.php This file should:
Display a form that allows the user to enter the order information and submit it to the addorder function in the controllersaddorder.php file.
Modify the index.php file to include the new controllers and views for the orders table, similar to the customers table.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started