There is no trick to it. Query the database, build a string, send it off. <? $query = "SELECT * FROM mytable"; $result = mysql_query($query); while($row = mysql_fetch_assoc($result)) { foreach ($row as $column => $value) { $body .= "$column : $value\n"; } $body .= "\n"; }
mail($to, $subject, $body, $headers); ?> HTH, Kevin ----- Original Message ----- From: "Scott Miller" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, April 02, 2003 12:05 PM Subject: [PHP] mailing forms and input into MySQL Hi all, I have a current php script that allows me to add/remove customer information from a particular MySQL Database. What I would like to do, is when an employee adds a customer, have some (if not all) of that information e-mailed to a particular e-mail address. I've created scripts that e-mail info, and ones that just enter info into a database, but have not attempted combining them. Anyone have any ideas, or is anyone doing this? If so, could you give me a quick how-to or point me in the direction of some online documentation? Thanks, Scott Miller -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php