I thought so too Rodney. But no matter where I place it, the form does not work. It works fine without the new email coding, but not with it. So somewhere I have an error. This is what it looks like:
<?
$req_fname = $POST['req_fname'];
$req_lname = $POST['req_lname'];
$req_church_org = $POST['req_church_org'];
$street = $POST['street'];
$city = $POST['city'];
$state = $POST['state'];
$zip = $POST['zip'];
$non_us_address = $POST['non_us_address'];
$country = $POST['country'];
$phone = $POST['phone'];
$req_email = $POST['req_email'];
$position = $POST['position'];
$source = $POST['source'];
$req_download = $POST['req_download'];
$platform = $POST['platform'];
$comment = $POST['comment'];
$error_msg = "";
$msg = "";
if(!$req_fname){
$error_msg .= "First Name \n";
}
if($req_fname){
$msg .= "req_fname = \t $req_fname \n";
}
if(!$req_lname){
$error_msg .= "Last Name \n";
}
if($req_lname){
$msg .= "req_lname = \t $req_lname \n";
}
if(!$req_church_org){
$error_msg .= "Organization \n";
}
if($req_church_org){
$msg .= "req_church_org = \t $req_church_org \n";
}
if($position){
$msg .= "position = \t $position \n";
}
if($street){
$msg .= "street = \t $street \n";
}
if($city){
$msg .= "city = \t $city \n";
}
if($state){
$msg .= "state = \t $state \n";
}
if($zip){
$msg .= "zip = \t $zip \n";
}
if($non_us_address){
$msg .= "non_us_address = \t $non_us_address \n";
}
if($country){
$msg .= "country = \t $country \n";
}
if($phone){
$msg .= "phone = \t $phone \n";
}
if($source){
$msg .= "source = \t $source \n";
}
if(!$req_download){
$error_msg .= "Which product \n";
}
if($req_download){
$msg .= "req_download = \t $req_download \n";
}
if($platform){
$msg .= "platform = \t $platform \n";
}
if($comment){
$msg .= "comment = \t $comment \n";
}
if(!$email){
$error_msg .= "Your email address \n";
}
if($email){
if(!eregi("[a-zA-Z0-9.-]+@[a-zA-Z0-9.-]+.[a-zA-Z]{2,4}", $email)){
echo "\n<br>That is not a valid email address. Please <a href=\"javascript:history.back()\">return</a> to the previous page and try again.\n<br>";
exit;
}
$msg .= "req_emailaddress = \t $email \n";
}
$sender_email="";
if(!isset($name)){
if($name == ""){
$sender_name="Web Customer";
}
}else{
$sender_name=$name;
}
if(!isset($email)){
if($email == ""){
$sender_email="Customer@website.com";
}
}else{
$sender_email=$email;
}
if($error_msg != ""){
echo "You didn't fill in these required fields:<br>"
.nl2br($error_msg) .'<br>Please <a href="javascript:history.back()">return</a> to the previous page and try again.';
exit;
}
$mailheaders = "MIME-Version: 1.0\r\n";
$mailheaders .= "Content-type: text/plain; charset=iso-8859-1\r\n";
$mailheaders .= "From: info@bythebook.com\r\n";
$mailheaders .= "Reply-To: $sender_email <$sender_email>\r\n";
mail("technical@inspireddesign.biz","Free Download",stripslashes($msg), $mailheaders);
mail($email,"Free Download",stripslashes($msg), $mailheaders);
/ recipients /
$to = "<" . $email .">";
/ subject /
$subject = "Trial Download";
/ message /
/ top of message /
$message = "
blah
blah
blah
$message .= "
/ headers /
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: <info@bythebook.com>\r\n";
$headers .= "X-Mailer: PHP / ".phpversion()."\r\n";
/ mail it /
mail($to, $subject, $message, $headers);
header("Location: http://216.121.255.74/ude6e5.php"); / Redirect browser /
//This is the end of the PHP code
?>