Re: PHP / Email / ActionScript

From: Date: Wed, 07 Jul 2004 13:34:30 +0000
Subject: Re: PHP / Email / ActionScript
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-189865@lists.php.net to get a copy of this message
"Josh eastgate" <onilinkz@yahoo.com.au> wrote in message news:20040707132805.63357.qmail@web50808.mail.yahoo.com... > Hi, > > I have made a shopping kart for a web site, in > flash...and I have it so when the shopping kart is > submitted...all the order details (variables) are sent > to a PHP file that sends the order to the businesses > email. > My main problem is with the PHP file. I dont know how > to use IF THEN ELSE statements within it. At the > moment I have it so that is sends 12 items details > even if the user has only ordered 5 or so. (so there > is allot of blank items) I want it so that it sends > the exact amount of items ordered (and their details) > to the businesses email. > > Here is the php file (as a .txt): > http://chezanziar.com.au/PHP.txt > > As you can see....at the moment it prints out 12 items > no matter what the case. I was thinking I could send a > variable to the PHP file (along with the other > information) that says how many items have been > ordered....then I could use some kind of loop (FOR > loop) to print the exact amount.......the problem is I > dont know how to use FOR loops and IF THEN ELSE > statements within PHP.......is it possible to use > these statements (FOR, IF) within the $EmailBody=""?? > > Please help. > > Thank you. Hi, here you'll find all control structures available in PHP (with usage examples): http://de2.php.net/manual/en/language.control-structures.php Regards, Torsten Roehr

« previous php.general (#189865) next »