Question about order form script
I have a simple order form and a calculator script. After the script had calculated the total costs, the customer has to enter his email address and home address and all this should be sent to my Email address.
How to combine all this without MySQL?
Can you give me some hints and tips?
Order form:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<title>Product Cost Calculator</title>
</head>
<body>
Fill out this form to calculate the total cost: <br />
<form action="handle_calc.php" method="post">
<br />
Quantity: <input type="text" name="quantity1" value="0" size="5" />
(price per unit 3$)<br />
Quantity: <input type="text" name="quantity2" value="0" size="5" />
(price per unit 5$)<br />
<br />
<br />
<input type="submit" name="submit" value="Calculate!" />
</form>
</body>
</html>
<?php //
// Address error handing.
ini_set ('display_errors', 1);
error_reporting (E_ALL & ~E_NOTICE);
// In case register_globals is disabled.
$quantity1 = $POST['quantity1'];
$quantity2 = $POST['quantity2'];
// Calculate the total.
$total1 =(3 $quantity1);
// Print out the results.
print "You have selected to purchase:
<b>$quantity1</b> item1(s) at <b>3$</b> with a the subtotal cost of <b>$total1</b><b>$</b><br />";
$total2 =(5 $quantity2);
// Print out the results.
print "You have selected to purchase:<b>$quantity2</b> item2(s) at <b>5$</b> with a the subtotal cost of <b>$total2</b><b>$</b><br />";
$summe = $POST['total1'] + $POST['total2'];
$summe=$total1+$total2;
// Print out the results.
print "<p>Total cost of your purchase:";
echo "$summe<b>$</b></p>";
?>