<html>
<head>
<title>"Motive Currency converter"</title>
</head>
<body>
<center>
<h3>Please enter the price of the item in euros</h3>
we will convert the price to dollars for you.
<form action="currency.php" method="post">
Please enter the price of the item in euros $<input type="text" name="cost">
<p><input type="submit" name="submit" value="click here to convert the euro price to dollars?">
</center>
</form>
</body>
</html>
This is the html for the first page which should point to the php page currency.php.
<html>
<head>
<title>dollars</title>
</head>
<body>
<?php
$dollar =1.034;
function currencyconvert($cost, $dollar) {
$totalprice = ($cost * $dollar);
print "the price of the item in dollars is \$$totalprice ";
}
currencyconvert($cost, $dollar);
?>
</body>
</html>
above is the currency.php page but for some reason the figure that the user enters in the input box on the first page isnt recognised by the computer? any ideas??