Page 1 of 1

Sending an Email with MySQL data

Posted: Mon Sep 29, 2008 12:59 pm
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>"
);

Re: Sending an Email with MySQL data

Posted: Mon Sep 29, 2008 2:27 pm
by tyler.pomroy
hi kim

i think this is best the solution.

thanks