php and html web programming?

c2_91

New member
I need to write a web page that calculates the total area of a floor that needs to be tiled, and if its over 1000 square feet then they get a 5% discount. I then need to tell the customer the totla area of their floor and their name on the response page.

I have to have a php file and an html file, here is what i got so far:

php--
<html><head><title>Tile Store</title></head>
<body>
<?php
extract($_REQUEST);
$width = "width";
$length = "length";
$totalArea = "width * length";

print "The total area you want to tile is: " $totalArea;

if ( $totalArea > 1000 )
print "You get a 5% discount";


?>
</body>
</html>

html--
<head><title>Tile Store</title></head>
<body>
<form action="test1.php" method=get>
Please enter your first name: <br />
<input type="text" size=50 name="fname">
<p>
Please enter your last name: <br />
<input type="text" size=50 name="lname">
<p>
Please enter your email: <br />
<input type="text" size=50 name="email">
<p>
Please enter the width of the area you would like to tile: <br />
<input type="text" size=50 name="width">
<p>
Please enter the length of the area you would like to tile: <br />
<input type="text" size=50 name="length">
<p>
<input type=submit value="submit">
</form>
</body>
</html>

It doesnt work for me, and im not sure what im doing wrong any mistakes you see please poin them out
 
Back
Top