Sending an Email with MySQL data

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
carmen.smth1
Forum Newbie
Posts: 8
Joined: Mon Sep 29, 2008 12:45 pm

Sending an Email with MySQL data

Post by carmen.smth1 »

Hello everyone this is smith,
I am setting up some email sending with PHP pulling info from MySQL.
I have one question on how to make the message body.

Here is the code I have.
What is the key to getting the PHP loop to be equal to a value.

Code: Select all

$ToMail = 'xyz@xyz.com';
$MsgSubject = "hello all";
 
 
$MsgBody = (
echo "<table>";
while($row589 = mysql_fetch_array($sql589)) {
echo "<tr>";
echo "<td>".$row589['name']."</td>";
echo "<td>".$row589['address']."</td>";
echo "<td>".$row589['bod']."</td>";
echo "<td>".$row589['phone']."</td>";
echo "</tr>";
}
echo "</table>"
);
tyler.pomroy
Forum Newbie
Posts: 8
Joined: Mon Sep 29, 2008 1:49 pm

Re: Sending an Email with MySQL data

Post by tyler.pomroy »

hi kim

i think this is best the solution.

thanks
Post Reply