Can you send mail() getting information from different rows in database (MySql)?
Is there a way to display more than 1 row of information that is pulled from MySql and send that by mail() ???
example; (database) I have list of cars:
| 2003 | Honda | Prelude | Blue |
| 2004 | Acura | TSX | Red |
| 2003 | Acura | RSX TypeS | Black |
(I am able to send 1 specific car to email with all info, but not all, here is my example)
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "Content-Transfer-Encoding: 8bit;\r\n\r\n";
$me = 'me@spam.com';
$todaynow = Time();
$today1 = date("d-M-Y H:i:s",$todaynow);
$database = "carsonnet";
$db = mysql_select_db($database,$connection)
or die ("Error");
$query = "SELECT * FROM `cardatabase` WHERE";
$result = mysql_query($query)
or die ("Error");
$message1 = "<html><head></head><body><table><tr>
<td rowspan='2'>
<img src='$picture.jpg' width='120' border='0'></td>
<td>
<font face='Verdana' size='3'><B>$year $make $model</b> | $colour</font><BR>
<font face='Verdana' size='2' color='black'><i>$today1</i>
</td>
</tr>
</table></body></html>";
mail($me,"Info - $year $make $model - UPDATE",$message1,$headers);
Thank you in advance if you can help me out....