subject

Build the Product Discount application This exercise steps you through the process of building the Product Discount application. Open the files for the Product Discount application 1. Make sure the Apache server is running. Then, start your browser and run the application in this directory: xampp\htdocs\ex_starts\ch02_ex1 To do that, you can use the index of exercise starts that you bookmarked in exercise 1-2 or you can use this URL: http://localhost/ex_starts/ch02_ex1
2. Enter valid data in the three text boxes, and click the Calculate button. Note that the resulting web page indicates that it is under construction.
3. Use your IDE or text editor to open the display_discount. php file for this application. It is in the same folder as the index. html file. Then, note that this file doesn’t contain the PHP statements that this application needs.
4. Use your IDE or text editor to open the index. html file for this application. Then, note the name attributes for the three text boxes. Add the PHP statements
5. Switch to the display_discount. php file and add statements that use the $_POST array to get the product description, list price, and discount percent from the form. Then, modify the first three echo statements so they display this data, save the file, and run the application again. This should display unformatted versions of the data that you enter.
6. Switch to the display_discount. php file and change the statements that use the $_POST array to use the filter_input function instead. Save the file and run the application to make sure it still works as expected.
7. Switch to the display_discount. php file and add statements that calculate the discount amount and discount price. Then, modify the last two echo state- ments so they display this data, save the file, and run the application. This time, the application should display unformatted versions of the calculated data.
8. Switch to the display_discount. php file and add statements that format the numeric variables with the currency and percentage formats. Then, modify the last four echo statements so they display the formatted data, save the file, and run the application. Now, the application should display the formatted data.
9. Keep the application running and navigate to the index. html page if you’re not already there. In the Product Description textbox, enter "Guitar", and in the Discount Percent textbox, enter "10". Click the Calculate Discount button, and notice that the Product Description value is displayed in bold, and the Standard Discount value is displayed in italics.
10. Switch to the display_discount. php file and add the htmlspecialchars function to the echo statements for Product Description, List Price, and Standard Discount. Then save the file, run the application, and repeat step 9. Notice that this time, the HTML tags are displayed as HTML entities, rather than being implemented by the browser.

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 23:00, fluffy374747
The animal classthis class represents a an animal residing at a zoo. it has a weight (in pounds),height (in inches), a name, and a color. the methods in the class include constructors, getters, and a tostring. you will finish the implementation of these methods. referto the code documentation.1.getters: you will need to implement getter methods. these get a value (froma member variable) in the animal class. you will make a getter method toreturn each variable (weight, height, name, color). reference getname if youare having issues.2.tostring: you will need to finish the tostring method. this returns a stringcontaining information about an animal. the output string should be of theformat: ” (name) , a ( color )â’colored animal . ( weight ) pounds , ( height ) inches .\n”the height and weight are formatted to 1 decimal place. recall from lab 1how to format strings neatly using string. see the reference sectionfor more about string. format.
Answers: 2
image
Computers and Technology, 22.06.2019 11:30, KrishnaBalaram1235
To hide gridline when you display or print a worksheet
Answers: 1
image
Computers and Technology, 23.06.2019 01:00, lusciousl
Petrică, tânăr licean în clasa a ix-a, a primit în dar de la părinţii săi un cont bancar pentru micile sale cheltuieli curente. el este pasionat de internet banking şi îşi verifică cu grijă toate tranzacţiile efectuate. pentru creşterea securităţii tranzacţiilor online, banca îi furnizează lui petrică un număr pe care el va trebui să îl modifice, obţinând un număr tan – număr de autentificare a tranzacţiei (transaction authentication number). regula de obţinere a numărului tan este următoarea: se formează cel mai mic număr par din toate cifrele numărului furnizat de bancă. cerinţă cunoscând numărul n furnizat de bancă, să se determine numărul tan obţinut de petrică. date de intrare fişierul tan. in conţine pe prima linie numărul natural n cu semnificaţia din enunţ. date de ieşire fişierul de ieşire tan. out va conţine o singură linie pe care va fi scris numărul tan cerut. restricţii • 0 < n < 18*1018 • n are cel puţin o cifră pară • numărul tan obţinut nu poate conţine zerouri nesemnificative
Answers: 2
image
Computers and Technology, 23.06.2019 03:30, patience233
Many everyday occurrences can be represented as a binary bit. for example, a door is open or closed, the stove is on or off, and the fog is asleep or awake. could relationships be represented as a binary value? give example.
Answers: 1
You know the right answer?
Build the Product Discount application This exercise steps you through the process of building the P...

Questions in other subjects:

Konu
English, 24.09.2019 10:30
Konu
History, 24.09.2019 10:30
Konu
Mathematics, 24.09.2019 10:30
Konu
English, 24.09.2019 10:30