PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
<?php
if (isset($_POST['Submit'])) {
$from = "From: Guestlist@domain.co.uk";
$to = "".$_REQUEST['Email']."";
$subject = "You are now registered to attend our event";
$body = "
";
mail($to, $subject, $body, $from);
}
?>
I want this is be a html email, or if not just to be able to attach a siganture from an image on the website to be included in the email, Im not sure if i can even use the above format. I used the above since the form fields feed into a database. Any ideas?
<?php function generateEmail($from, $to, $subject, $body)
{
return <<<STOP
<html>
THIS IS WHERE THE HTML GOES
STOP;}
// ..........
mail("".$_REQUEST['Email']."",
"GUESTLIST FORM",generateEmail ($from, $to, $subject, $body); ?>
where does this fit in?
$from = "From: Guestlist@domain.co.uk";
$to = "".$_REQUEST['Email']."";
$subject = "You are now registered to attend";
this all goes in <?php ?> tags in the body does it? also is there no </html> tag?