Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please note that the given screenshots are sample only. Figure 1 : Sample Database Cold Drink Cafe Add Drink Category: Code: Name: List Price: View
Please note that the given screenshots are sample only.
Figure : Sample Database Cold Drink Cafe
Add Drink
Category:
Code:
Name:
List Price:
View Drink List
@ Cold Drink Cafe, Inc.
Figure : When you click "Add Drink" button Cold Drink Cafe
Modify Drink
Name:
Modify Drink
View Drink List
Figure : When you click "Modify" buttonDescription of task:
This project will be a comprehensive Website that demonstrates application of many of the PHP concepts covered in this unit.
Suppose you have planned to open a Cold Drink Cafe. For this business, you need to develop a PHP web application to manage your Cold Drink Cafe application. It requires cold drinks to be stored in a database, the items wont be lost when you close the application.
Create a Database
For making your cold cafe application, you will create two tables named Categories and Products Categories table will have two columns categoryID, categoryName; categoryID is its primary key. Products table will have these columns productID, categoryID, productCode, productName and listPrice; productID is its primary key Sample database attached below in Figure
There will be three types of categories of drinks regular, zero sugar and diet. Then you will give sample data input to these tables to create the database.
Create a user interface
The user interface for the Cold Drink Cafe shows the database of drink list, along with categories, at the top of the web page. This interface also includes an add form that lets you add a new drink to the list, a delete form that lets you delete a drink from the list, also a modify form to modify a drink name.
Please note that the given screenshots are sample only.
Figure : Sample Database
Figure : When the application runs for the first time
Implement Add, Delete and Modify Buttons
Suppose you have added a new drink to your cafe, for adding this to your app, you will implement Add Drink button which is used to add drinks in the list.
Then maybe one drink is out of stock, so you need to delete it from the database, thats why you need a Delete button is to delete the selected specific drink. You can use the arraypush function to add a new item to the list.
Suppose you dont want to sell IceCola because of low customer demand. Rather than this, you want to sell Mountain Dew in the same price. So you need a Modify button to modify an existing drink name. If you click on the Modify button, this code should hide the form that contains the Modify button, and it should display the form that displays a text box where the modified drink name will be given. and includes buttons that lets you save the changes. There will also be a button to view your drink list.
Figure : When you click Add Drink button
Figure : After adding a drink in the list under Regular category
Figure : When you click Delete button The first drink named CocaCola is deleted here
Figure : When you click Modify button
Figure : After modifying the last drinks name of Figure
After you click Modify Drink, the drink name is updated and the page looks like as in the Figure
After a modification, the last drink name changed from Ice Cola to Mountain Dew
This is how add, delete and modify will work.
Implement the Sort Drink button
Suppose you want to give a new look to your application by sorting the drinks alphabetically. So you will implement that code that allows you to sort all drinks alphabetically in each category.
Test the application
Test your application to make sure that everything works correctly.
What to submit:
A cover page A format displaying course code, course name, assignment title and student id with student's signature.
Student contribution report with meeting minutes
Documentation including installationusage instructions, source code and test report with test cases
and an acknowledgement for source of external resources etc.
Upload a zip file assign folder with all PHP Style Sheet, and Images folder if applicableCold Drink Cafe
Figure : When the application runs for the first time
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