Last active
September 30, 2016 11:35
-
-
Save sebgates/743ded07ca56e007b14ce4ac143784fd to your computer and use it in GitHub Desktop.
Ex 5 Index file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (isset($_GET)){ | |
$error_message = $_GET["error_message"]; | |
} else{ | |
$error_message = ""; | |
} | |
?><!DOCTYPE html> | |
<!-- | |
To change this license header, choose License Headers in Project Properties. | |
To change this template file, choose Tools | Templates | |
and open the template in the editor. | |
--> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title></title> | |
<style> | |
#error { | |
color: red; | |
font-weight: bold; | |
} | |
label { | |
display: inline-block; | |
width: 150px; | |
font-weight: bold; | |
} | |
</style> | |
</head> | |
<body> | |
<?php echo "<span id='error'>" . $error_message . "</span>"; ?> | |
<form action="product_discount.php" method="post"> | |
<label>Product Description:</label> | |
<input type="text" name="product_description"><br> | |
<label>List Price:</label> | |
<input type="text" name="list_price"><br> | |
<label>Discount Percent:</label> | |
<input type="text" name="discount_percent"><span>%</span><br> | |
<label> </label> | |
<input type="submit" value="Calculate Discount"><br> | |
</form> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment