using a variable to mail a long set of html code
Posted: Mon Oct 09, 2006 8:36 pm
I want to send in an email a bunch of html code that includes some stuff queried from a database in my mail function but I'm having a problem having the queries within my message variable for the mail function.
Im including the important parts of the code, but much of it is left out: (the important part is having the php echos inside the html code...so is there a way to get this done?)
Thanks!
Im including the important parts of the code, but much of it is left out: (the important part is having the php echos inside the html code...so is there a way to get this done?)
Code: Select all
// message
$message =
<html>
<head>
<title>test</title>
</head>
<body>
<p>Here is what was submitted</p>
<table>
<tr>
<th>Test</th><th> <?php echo $weekly['announcements'] ?></th>
</tr>
</table>
</body>
</html>
// Mail it
mail($to, $subject, $message, $headers);
?>