I did it this way and it works.
but....is that the "right" way to do it?
<?php include "header.php"; ?>
<table width="1000" border=0 align="center" cellpadding=5 cellspacing=0>
<tr>
<td width=150 background="images/bg_pix.jpg"></td>
<td width=600 bgcolor=#FFFFFF>
<?php
// multiple recipients
$to = 'admin@example.com' . ' , '; // note the comma
// subject
$subject = $_POST['subject'];
// message
//echo "$data[0]";
$message = $_POST['message'];
//$message = get_db_setting('email_text');
// To send HTML mail, the Content-type header must be set
// andy: NOT HTML email
//$headers = 'MIME-Version: 1.0' . "\r\n";
//$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
// Additional headers
//$headers .= 'To: <$to>' . "\r\n";
$headers .= 'From: ' . $_POST['emailFrom'] . "\r\n";
// Mail it
mail($to, $subject, $message, $headers);
?>
<h2>Thanks!</h2>
Email has been sent to: <br> <?php echo nl2br($to); ?> <br> <br> <br> <br> </H2>
</td>
<td width=150 background="images/bg_pix.jpg"></td>
</tr>
</table>
<body>
<?php include "footer.php"; ?>
I guess what I'm trying to accomplish is sending the email to the designated email address in my database settings instead of putting in my email address.
In the RED field is my example email address which use to be
$to = get_db_setting('email_from') . "\r\n"; // note the comma
Any ideas? Could it be a missing comma? It says note the comma but I don't see a comma.