gpinzino
asked on
PHP Looped Function Will Not Send Multiple Emails
I am working on an osCommerce site which offers a few products and a variety of music classes. Each product and class is processed in the usual way, but an additional process is added which is supposed to send a separate email for each item or class purchased. The emails contain details about the product or the class. The function, doemail(), is attached. The problem is that when a user orders multiple items, only the email for the first item ordered is sent. The other items appear to be ignored.
The function first searches the database for the items contained in the order. It then enters a while loop. Inside the loop, a switch statement assigns values for various parameters associated with the item referenced in the row being examined. Next, a series of conditional routines, compose the message to be sent in the email. Finally, the email is supposed to be sent and the loop begins again with the next row.
As noted, the function works well for the first row, but fails to function after that. No error messages are generated on-screen.
customfunctions.php
The function first searches the database for the items contained in the order. It then enters a while loop. Inside the loop, a switch statement assigns values for various parameters associated with the item referenced in the row being examined. Next, a series of conditional routines, compose the message to be sent in the email. Finally, the email is supposed to be sent and the loop begins again with the next row.
As noted, the function works well for the first row, but fails to function after that. No error messages are generated on-screen.
customfunctions.php
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You are welcome.
ASKER