Revision: 16971
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at August 19, 2009 12:06 by jcroom
Initial Code
function message() { $m2 = ''; $result = mysql_query("SELECT * FROM inventory WHERE count < 4"); while($row = mysql_fetch_array($result)) { $m2 .= $row['item']. ": " .$row['count'] . "<br>"; } return $m2; } $to = "[email protected]"; $subject = "My subject"; $from = "[email protected]"; $headers = "MIME-Version: 1.0" . " "; $headers .= "Content-type:text/html;charset=iso-8859-1" . " "; $headers .= "From: $from"; $message = message(); mail($to,$subject,$message,$headers); echo "Mail Sent.";
Initial URL
Initial Description
Take the contens from a table in MySQL and display it in an email
Initial Title
MySQL results in email
Initial Tags
email, php
Initial Language
PHP