The Discount Calculator used HTML, CSS, and PHP: HTML file includes: Discount Calculator

Discount Calculator


 %

CSS file includes: body { font-family: Helvetica, Arial,sans-serif; color: maroon; margin: 10px; padding: 0; } #content { width: 450px; margin: 0 auto; padding: 15px; background: white; border: 2px solid salmon; } h1 { color: salmon; font-family: Garamond; text-align: center; } label { width: 10em; padding-right: 1em; float: left; } #data span { /*border: 1px solid black;*/ float: right; margin-right: -13px; } #data input { float: left; width: 10em; margin-bottom: .5em; } #buttons input { float: left; margin-bottom: .5em; } br { clear: left; } PHP file includes: Go back and re-enter values.'; } else { // calculate the discount $discount = $regular_price * $discount_percent * .01; $discount_price = $regular_price - $discount; // apply currency formatting to the dollar and percent amounts $regular_price_formatted = "$".number_format($regular_price, 2); $discount_percent_formatted = $discount_percent."%"; $discount_formatted = "$".number_format($discount, 2); $discount_price_formatted = "$".number_format($discount_price, 2); } ?> Discount Calculator

Discount Calculator