Not sure what is going wrong.

Ok, Yes, I am a beginner and I am trying to work this Product Discount Calculator and I am certain my code is correct but after bringing my index.php up on the computer and putting items in the selected boxes it is coming up as the page is not found. Here is my code to the display_discount.php
[php]<?php
//get the data from the form
$product description = $_POST[‘product_description’];
$list_price = $_POST[‘list_price’];
$discount_percent = $_POST[‘discount_percent’];

//calculate the discount and discounted price
$discount = $list_price * $discount_percent * .01;
$discount_price = $list_price - $discount;

//apply currency formatting to the dollar and percent amounts
$list_price_formatted = "$".number_format($list_price, 2);
$discount_percent_formatted = $discount_percent."%";
$discount_formatted = "$".number_format($discount, 2);
$discount_price_formatted = "$".number_format($discount_price, 2);

?>

<title>Product Discount Calculation</title>
<link rel="stylesheet" type="text/css" href="styles.css" />
</head>

<body>
	<div id="content">
		<h1>Product Discount Calculation</h1>
		
		<label>Product Description:</label>
		<span><?php echo $product_description; ?></span><br>
		
		<label>List Price:</label>
		<span><?php echo $list_price_formatted; ?></span><br>
		
		<label>Standard Discount:</label>
		<span><?php echo $discount_percent_formatted; ?></span><br>
		
		<label>Discount Amount:</label>
		<span><?php echo $discount_formatted; ?></span><br>
		
		<label>Discount Price:</label>
		<span><?php echo $discount_price_formatted; ?></span><br>
		</div>
		</body>
		</html>[/php]

Here is my index.php code

[php]

Product Discount Calculator

Product Discount Calculator

        <div id="data">
            <label>Product Description:</label>
            <input type="text" name="product_description"
                   value=""/><br />

            <label>List Price:</label>
            <input type="text" name="list_price"
                   value=""/><br />

            <label>Discount Percent:</label>
            <input type="text" name="discount_percent"
                   value=""/>%<br />
        </div>

        <div id="buttons">
            <label>&nbsp;</label>
            <input type="submit" value="Calculate Discount" /><br />
        </div>

    </form>
</div>
[/php]

Could someone point me in the right direction as to what I am not doing? I uploaded my index.php file to the server. Do I need to upload my other file display_discount.php? Not sure. This is my first php calculator file. Thank you in advance.

[php]<?php
//get the data from the form
$product description = $_POST[‘product_description’];[/php]

change to
[php]<?php
//get the data from the form
$product_description = $_POST[‘product_description’];[/php]

Sponsor our Newsletter | Privacy Policy | Terms of Service