Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a PHP script to develop a simple web page for an online shop to help the owner of the shop to manage his sales.
Write a PHP script to develop a simple web page for an online shop to help the owner of the shop to manage his sales. The shop offers only three different items with different prices and gives a different percentage discount (%) on every sold item.
You need to develop the web page by using only the basic HTML tags that you learnt in M275. The web page should satisfies the following specifications:
- Displays the name of the online shop. [1 mark]
- Displays the name, the unit price and the percentage discount of each item. [4 marks]
- Interacts with a customer to enter the number of units s/he wants to buy from each item. [4 marks]
- Computes and displays the percentage discount of each sold item. [3 marks]
- Computes and displays the total amount of each item sold. [4 marks]
- Computes and displays the total amount of all sold items before and after applying the discount. [4 marks]
- Computes and displays the total discount amount. [3 marks]
- Display a suitable message if the customer enters wrong values. [2 marks]
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