bryanptcs Posted March 10, 2008 Share Posted March 10, 2008 I have a contact form and it used to work. I think I might have changed versions of php but I am not sure what I had before. It is now running 5.1.6, here is the php code for the form. This is the error I am getting, it is from the last line of the PHP code: "Error: Please press back on your browser and try again." <?php $EmailTo = "bryanedwards05@gmail.com"; $contactsubject= Trim(stripslashes ($_POST['subject'])); $Name= Trim(stripslashes ($_POST['name'])); $HomeTel= Trim(stripslashes ($_POST['phone'])); $Email= Trim(stripslashes ($_POST['email'])); $Message= Trim(stripslashes ($_POST['message'])); $EmailFrom = $Email; // validation $validationOK=true; if (Trim($Name)=="") $validationOK=false; if (Trim($contactsubject)=="") $validationOK=false; if (Trim($Email)=="") $validationOK=false; if (Trim($Message)=="") $validationOK=false; if (!$validationOK) { echo "The form was not properly sent, please press back on your browser and make sure all required feilds are entered and try again. Thank you."; exit; } $Subject = "ChristKidz.com Contact Form " . $contactsubject; $Body =""; $Body .="Name: "; $Body .=$Name; $Body .="\n"; $Body .="Phone: "; $Body .=$HomeTel; $Body .="\n"; $Body .="Email: "; $Body .=$Email; $Body .="\n"; $Body .="\n"; $Body .="Message: "; $Body .="\n"; $Body .=$Message; $Body .="\n"; $success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>", $ReplyTo); if ($success) { echo "The Following Message has succesfully been sent to the childrens ministry:<br><br>"; echo "Name: $Name<br>"; echo "Phone: $HomeTel<br>"; echo "Email: $Email<br><br>"; echo "Subject: $Subject<br><br>"; echo "Message: $Message<br><br>"; echo "Thank you for your questions or comments, we will reply to them as soon as possible. Have a great day"; } else { echo "Error: Please press back on your browser and try again."; } ?> Quote Link to comment Share on other sites More sharing options...
BlueSkyIS Posted March 10, 2008 Share Posted March 10, 2008 i suggest that you try without the 5 parameter , $ReplyTo Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.