Please place your order';
$form_top="';
// stuff we need it the order
$order_head="
Results of your order
\n";
$order_bottom="Thank you for your order. We will ship when we get your
check. Prosit!\n
";
if($_GET['submitted']) {
// print the form
// note that the form uses numbers as control
// names
$total_euro=0;
print $order_head;
foreach($_GET as $number => $amount) {
// find the product number for the handle
if($amount > 0 and $products[$number]) {
$pay=$amount*$products[$number][price];
print "$amount bottles of ";
print $products[$number][name];
print " is €$pay ";
$total_euro+=$pay;
}
}
$total_dollar=$total_euro*$euro_rate;
$total_dollar=number_format($total_dollar,2);
print "The euro rate is $euro_rate \n";
print "Your bill is \$$total_dollar\n";
}
else {
print $form_greet;
print $form_top;
$product_count=0;
foreach ($products as $prod) {
print "\n