mail() help
Posted: Thu Apr 13, 2006 1:35 pm
Jcart | Please use
Is this right? How can I cycle through and display the table in the body of the email? The error I am currently getting is:
Parse error: parse error, unexpected T_WHILE
Thanks!
Jcart | Please use
Code: Select all
andCode: Select all
tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
I am trying to send an email that displays updates to a table in my database. Basically, I am trying to cycle through the table in the body of my email. I am not sure if I am doing this right or if there is even a way to do it. Here is the code:Code: Select all
$body = 'Peel, Inc.' . "\n"
.'Weekly ShopDani Inventory Updates' . "\n"
.date('jS F Y') . "\n\n\n"
."\t\t". 'Jewelry Name' . "\t" . 'Old Amt.' . "\t" . 'New Amt.' . "\n"
while ($row = mysql_fetch_array($result)) {
$row = mysql_fetch_array($result);
$name = $row[jewelryName];
$oldAmt = $row[oldAmount];
$newAmt = $row[newAmount];
echo "\t\t $name \t $oldAmt \t $newAmt \n";
}Parse error: parse error, unexpected T_WHILE
Thanks!
Jcart | Please use
Code: Select all
andCode: Select all
tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]