Question: Hi, I'm having some issues with an assignment for one of my CIT courses and would like some advice if possible. The issues I am
Hi, I'm having some issues with an assignment for one of my CIT courses and would like some advice if possible. The issues I am having relate to inserting the images and getting the total for the clothing items. I'm struggling with the syntax since PHP is very new to me. Is there any way you can help me? Thank you. Here is the assignment:
For this assignment, to make our first attempt at some basic PHP code as shown in Chapter 1 of the textbook, we will create a very simple web page clothing_sales.php that sells some clothing. In this web page, include:
1. Embedded CSS for the following tags, same as you did for Assignment 01 a. h1 40px font size and a color of your choice b. h2 30px font size and a color of your choice c. p 16px font size and a color of your choice
2. An h1 heading for the entire page, showing the name of your clothing business make up a name for it.
3. An h2 heading for Shirts
4. An image of a shirt that you like
5. A PHP script in the shirts section that contains the following:
a. A constant named SHIRT_PRICE set it to a price you want to charge for your shirts
b. A variable named shirts, to represent the number of shirts being sold
c. Generate and assign a random integer value between 1 and 10 to this variable, e.g., to create a variable named x and assign a random integer between 50 and 60 to it, we would do $x = rand(50, 60);
d. A variable named shirts_total in which you calculate the total for the shirts being sold
e. Print the total for the shirts using an HTML paragraph tag and include a $ symbol before the total, e.g., the web page could show Total for your shirts: $24.95
6. Likewise, h2 headings for Pants and Shoes, with an image under each one and a PHP script under each one with a. Constants PANTS_PRICE and SHOES_PRICE b. Variables pants, pants_total, shoes, shoes_total c. Calculation and output of the total for each ones as described earlier for shirts
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
