Question: 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 1: Sample Database Cold Drink Cafe
Add Drink
Category:
Code:
Name:
List Price:
View Drink List
@ 2024 Cold Drink Cafe, Inc.
Figure 3: When you click "Add Drink" button Cold Drink Cafe
Modify Drink
Name:
Modify Drink
View Drink List
Figure 6: 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 1).
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 1: Sample Database
Figure 2: 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 array_push() 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 3: When you click Add Drink button
Figure 4: After adding a drink in the list under Regular category
Figure 5: When you click Delete button (The first drink named CocaCola is deleted here)
Figure 6: When you click Modify button
Figure 7: After modifying the last drinks name of Figure 5
After you click Modify Drink, the drink name is updated and the page looks like as in the Figure 7.
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:
1. A cover page (A4 format)- displaying course code, course name, assignment title and student id with student's signature.
2. Student contribution report with meeting minutes
3. Documentation including installation/usage instructions, source code and test report with test cases
and an acknowledgement for source of external resources etc.
4. Upload a zip file (assign folder with all PHP, Style Sheet, and Images folder if applicable)Cold Drink Cafe
Figure 2: When the application runs for the first time
 Please note that the given screenshots are sample only. Figure 1:

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!