Hello,
Is there a way to modify the following script to send copies and blind copies also? There is another file for the captcha but I’m thinking you don’t need to see that? Thank you.
<?
session_start();
?>
<HTML>
<BODY>
<?
$captcha = $_POST["captcha"];
if ($captcha == "") { $captcha = "0000000"; }
if ($captcha == $_SESSION['captcha_code']) {
// get posted data into local variables
$EmailFrom = "admin@mydomain.com";
$EmailTo = "name@mydomain.com";
$Subject = "Website Contact Request";
$Name = Trim(stripslashes($_POST['Name']));
$Email = Trim(stripslashes($_POST['Email']));
// validation
$validationOK=true;
if (Trim($Name)=="") $validationOK=false;
if (!$validationOK) {
print "<meta http-equiv=\"refresh\" content=\"0;URL=error.html\">";
exit;
}
// prepare email body text
$Body = "";
$Body .= "Name: ";
$Body .= $Name;
$Body .= "
";
$Body .= "Email: ";
$Body .= $Email;
$Body .= "
";
// send email
$success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>");
// redirect to success page
if ($success){
print "<meta http-equiv=\"refresh\" content=\"0;URL=thankyou.html\">";
}
exit;
} else {
};
unset($_SESSION['captcha_code']);
?>
<META HTTP-EQUIV="refresh" content="0;URL=error.html">
</BODY>
</HTML>