Grow your CSS skills. Land your dream job.

Simple Contact Form Problems

  • # March 1, 2011 at 2:25 pm

    Hi. I’ve never really worked with PHP but I’ve been trying to use the Nice & Simple Contact Form. It seems like it works but when I hit submit to test it, I never receive the email back. Any ideas as to what’s going wrong?

    My PHP:

    < ?php

    $EmailFrom = "creamandtwosugars@gmail.com";
    $EmailTo = "rmbruggeman@gmail.com";
    $Subject = "New Contact Form Response";
    $Name = Trim(stripslashes($_POST));
    $Email = Trim(stripslashes($_POST));
    $Message = Trim(stripslashes($_POST));

    // validation
    $validationOK=true;
    if (!$validationOK) {
    print "";
    exit;
    }

    // prepare email body text
    $Body = "";
    $Body .= "Name: ";
    $Body .= $Name;
    $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
    if ($success){
    print "";
    }
    else{
    print "";
    }
    ?>

    And the html:


    < !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">














    Please feel free to contact me via email or the form below.
























    # March 1, 2011 at 4:47 pm

    Sometimes these forms do take a while to send. I set one up recently that would take like 30 minutes to arrive. I thought it was broken til I started getting them in my inbox. Awkwardly enough, some went to my spam folder as well. I assume gmail is more on top of spam than yahoo is so the first thing I would do check is your spam folder.

    # March 1, 2011 at 4:51 pm

    Thanks for your help but I got the problem fixed. I think it had to do with GoDaddy’s handling of emails with PHP but I just used a different method and now have a working comment box.

    # March 1, 2011 at 4:54 pm

    All you had to say was “godaddy” :) Took me for freaking ever to figure out that they were the problem with all of my forms.

    adg
    # March 25, 2011 at 9:18 am

    What did you do to fix the problem. I’m running into the same issue.

    # May 16, 2013 at 6:29 am

    I’m having the same problem too! It looks like the only thing I can do is change the method of posting the information gathered by the contact form via some other means that doesn’t involved PHP right?

    I’ve been back and forth with the GoDaddy support team for 3 days now and they haven’t mentioned a thing about issues with PHP contact forms, despite me mentioning is several times. They are useless.

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

You must be logged in to reply to this topic.

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