Wade wrote:
<?phpYour questions are well-covered by the manual, especially here:
$total= 0;
echo 'Your order was for the following:<br><br>';
echo 'Entree: "' . $_POST . $Course1 . '"<br>';
echo 'Dessert: "' . $_POST . $ListBox2 . '"<br><br>';
foreach (array($Course1, $ListBox2) as $val)
{
if (ereg('[0-9]+', $val, $regs)) $total += $regs[0];
}
echo 'TOTAL BILL = $"' . $total . '"<br>';
?>
http://www.php.net/manual/en/language.variables.external.php http://www.php.net/manual/en/reserved.variables.php#reserved.variables.post
http://www.php.net/manual/en/language.types.array.php
The PHP manual is very well-written and helpful for people who are used to other programming languages. If you have no previous programming experience, I'd suggest to go to the local library (if you have one) or a book shop and borrow/buy a book about the basic concepts of computer programming. It will be wortwhile and save you a lot of time in the long run.
--
Best regards,
Per Lundberg / Capio ApS
Phone: +46-18-4186040
Fax: +46-18-4186049
Web: http://www.capio.com
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php