janmaymaymay

janmaymaymay

Lv1

janmaymaymay

0 Followers
0 Following
0 Helped

ANSWERS

Published8

Subjects

Business2Computer Science4Mathematics2
Answer:Whether you're using bread flour, cake flour, all-purpose flour, or any...
Answer:G(X)= 2x+4 If X≫1 And X+2 If X ≪ Or Equal To 1. A. Find G...
Answer:it is d
Answer: It is d+ beiend
Answer:yog
Answer: A it’s is true

Using PHP and HTML write this code

Purpose
  • Choose a product to sell on your website. (You cannot choose TV, as TV is the example product)
  • You are building an online store to sell your choice of product. (In the screenshot examples, the product is: TVs.) In its simplest form, it looks like this:
 
 
  • The client must be able to choose a product from at least 3 categories. See the Inventory structure below for more details.
  • A person may buy 1 or more products (in a particular category) at the same time. If the person wants to buy a product from another category, they will have to checkout separately. Ie. When calculating the total price, you only need to add the prices for products checked off in the current category.
  • The website should display the total price after the user presses "Checkout"
 
Online store's inventory
  • Choose at least 3 product categories for your product
    • (In the screenshot examples, the three product categories chosen were "Samsung", "LG", and "Sony", but you cannot choose these)
  • Choose at least 3 product items for each category, each with a price
    • (In the screenshot examples, the 3 items for the category "Samsung" are "Neo" at $\$ 4000.23$, "OLED" at $\$ 2300.23$ and "Crystal" at $\$ 1599.23$, but you cannot choose these.)
    • The items for each category should be different.
Therefore, there should be at least 9 product items in total.
Add a heading called "Your Shop Name", replacing it with a shop name of your choice
- Add a drop down menu with the 3 (or more) product categories as the options. The drop down menu must be within a form. You must use a loop (any loop of your choice) to do this. Use the GET method to send the category to your script once the
Checkout button has been pressed.
 
 
- Validate the category selection to make sure that the selected category:
  a. ... was sent to your script
  b. ... and matches one of the categories stored in the original associative array
- If the category is valid:
  a. Based on the category chosen, print out all the associated product items and prices as checkboxes.
  • - Use the GET method to send the price (of each item "checked" by the user) to your script. You must use a loop (any loop of your choice) to do this.
  • - Make sure to format the price to 2 decimal places.
 
 
9.         If the price has been sent:
    Add up together the prices of all the items "checked" in the current category. You must use a loop (any loop of your choice) to do this.
10.     - Add a heading called "Total: ______ " and (instead of the blank) print out the total prices you calculated above.
 
Case 1: Only 1 Item Checked out
 
 
Answer: J
yyeuehcu

Weekly leaderboard

Start filling in the gaps now
Log in