- This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- The forum ‘Back End’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Hello,
I’m a bit of a newbie at all this web design so please bear with me as I try and explain. I have followed Chris’s simple contact form and added it to a website I’m doing for a friends family. When I test it,it seems to work fine in Firefox but when I tried it in IE it just keeps on sending a blank email to the email address like its caught in some kind of loop. I cant figure out whats going on as I’ve no experience with php. Can anyone help me out please? I have to click stop or close the page to get it to stop sending the email.
The link to the contact page is http://shipsharbourcottage.com/contact.html
Heres the php contact page
<?php
// CHANGE THE VARIABLES BELOW
$EmailFrom = "[email protected]";
$EmailTo = "[email protected]";
$Subject = "Contact Form Submission";
$Name = Trim(stripslashes($_POST));
$Phone = Trim(stripslashes($_POST));
$Email = Trim(stripslashes($_POST));
$Message = Trim(stripslashes($_POST));
// prepare email body text
$Body = "";
$Body .= "Name: ";
$Body .= $Name;
$Body .= "n";
$Body .= "Phone: ";
$Body .= $Phone;
$Body .= "n";
$Body .= "Email: ";
$Body .= $Email;
$Body .= "n";
$Body .= "Message: ";
$Body .= $Message;
$Body .= "n";
// send email
$success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>");
// redirect to success page
// CHANGE THE URL BELOW TO YOUR "THANK YOU" PAGE
if ($success){
print "<meta http-equiv="refresh" content="0;http://shipsharbourcottage.com/contactthanks.html">";
}
else{
print "<meta http-equiv="refresh" content="0;http://shipsharbourcottage.com/error.html">";
}
?>
Anybody? Have I not added the correct stuff in my post? Or is this something nobody has come across before? Help please!!