Grow your CSS skills. Land your dream job.

Contact Form Problem in IE

  • # November 3, 2009 at 8:29 am

    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 = "info@shipsharbourcottage.com";
    $EmailTo = "info@shipsharbourcottage.com";
    $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">&quot;;
    }
    else{
    print "<meta http-equiv="refresh" content="0;http://shipsharbourcottage.com/error.html">&quot;;
    }
    ?>

    # November 4, 2009 at 4:33 pm

    Anybody? Have I not added the correct stuff in my post? Or is this something nobody has come across before? Help please!!

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".