Hello,
Hoping one of you can help me with this page: http://www.bhfhorses.com/contact_PHP.htm
The error I get is:
Warning: Cannot modify header information - headers already sent by (output started at /home/bhfhors/public_html/process_form.php:1) in /home/bhfhors/public_html/process_form.php on line 39
The page that is called to perform the email of the results contains:
><?php
/* INSTRUCTIONS
**************
* 1) Change the 'emailTo' variable (below) from "you@****** (Your Name)" to your own email and your own name
* 2) Change the 'emailFrom' variable (below) from "******" to your own domain (no www required)
* 3) a) Change the 'redirect' variable (below) from "www.******" to your own domain.
* Make sure you have a "thank_you.htm" in the root folder of your website
* 4) Make sure that each of your for elements on the page that submits to this script are named
* ike the following: <input type=text name="INFO__User_Name">
* NOTE: You cannot have spaces in the name of the for element.
* ie: GOOD element name "INFO__User_Name"
* BAD element name "INFO__User Name"
* 5) Set the "action" of the form to "process_form.php" in the form page that submits to this script
* Example: <form method='post' action='process_form.php'>
* 6) Submit form to make sure all required information gets emailed to you. If not, then go through steps 4 and 5 again.
*/
// CONFIGURATION SETTINGS
$emailTo = "webmaster@bhfhorses.com (Breezy Hill Farm)";
$emailFrom = "noreply@bhrhorses.com (Breezy Hill Farm Form Results)";
$subject = "Web Form Results";
$redirectURL = "http://www.bhfhorses.com/contact_confirmation.htm";
// PLACE ALL FIELDS PASSED IN FROM FORM INTO MESSAGE BODY
foreach ($_POST as $key => $value) {
$keyInfo = explode("__", $key);
if ($keyInfo[0] == "INFO") {
$message .= $keyInfo[1].":\n ".$value."\n\n";
}
}
// SEND EMAIL
mail($emailTo, $subject, $message, "From: ".$emailFrom);
// REDIRECT TO SPECIFIED THANK YOU PAGE
header("Location: $redirectURL");
?>
Any ideas out there?
Thanks in advance,
Bill Suarez