Question: Change the file name for index.html to index.php Add PHP code to index.php to display an error message named $error_message just below the page heading.
- Change the file name for index.html to index.php
- Add PHP code to index.php to display an error message named $error_message just below the page heading. Be sure to check that $error_message is not an empty value. Format it to be bold, red text.
- Display error messages if the Product Description, List Price and Discount Percent fields are empty after the user submits the form. (1)
- Display an error message if the List Price or Discount Percent data entered is not a number after the user submits the form.
- Display an error message if the List Price or Discount Percent data entered is less than zero after the user submits the form.
- If an error message is displayed, take the user back to the index.php page.
- Add a sales tax calculation of 8% based on the discounted price. Then, display the sales tax rate and the calculated sales tax amount after the discounted price.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
