Grow your CSS skills. Land your dream job.

CONTACT FORM not working … please help!!

  • # December 23, 2012 at 1:48 pm

    Guys, I need help!! I’m banging my head on the wall trying to resolve!

    When I click ‘SEND’ I’m getting an error message on line 33. I can’t figure out what’s going on!

    Please, your help is GREATLY appreciated.

    # December 23, 2012 at 1:50 pm

    @hendrix940 Post your code but remove any sensitive information, first.

    # December 23, 2012 at 1:51 pm

    @chrisburton, I’m new to the forums, can you please advise me the best way to do this? Thanks!!

    # December 23, 2012 at 1:52 pm

    < ?php
    $subject = “Comment/Question from the site.”;
    $message = “$question”;
    $mail_from = “$email”;

    $header = “from: $name < $mail_from>“;

    $to = “email@gmail.com”

    $send_contact = mail($to,$subject,$message,$header);

    if($send_contact){
    echo “

    We’ve received your email. We will email you back shortly.

    “;
    }
    else {
    echo “Error. Please go back and try again.”;
    }
    ?>

    # December 23, 2012 at 1:52 pm

    Okay, that’s my PHP

    # December 23, 2012 at 1:52 pm




    # December 23, 2012 at 1:52 pm

    @hendrix940 I only want what’s on line 33 for now. So just create an empty space/line, hit the spacebar 4x and paste.

    # December 23, 2012 at 1:53 pm

    that’s the html calling on the .php. Did I include everything?

    # December 23, 2012 at 1:53 pm

    $send_contact = mail($to,$subject,$message,$header);

    # December 23, 2012 at 1:54 pm

    Thank you sir. Above is line 33.

    # December 23, 2012 at 1:55 pm

    @hendrix940 What’s this about?

    $to = “email@gmail.com”

    Shouldn’t it be:

    $to = “email@gmail.com”;

    # December 23, 2012 at 1:56 pm

    that very well could be it @chrisburton … testing now.

    # December 23, 2012 at 1:59 pm

    @chrisburton, now it is sending (THANK YOU), HOWEVER, it’s not sending any of the information from the text fields. Just an email shows up with no information in the inbox.

    # December 23, 2012 at 2:00 pm

    Next time, include the actual error message. PHP does reasonably well at *telling you* what the problem is – you don’t have to guess.

    # December 23, 2012 at 2:01 pm

    > …HOWEVER, it’s not sending any of the information from the text fields. Just an email shows up with no information in the inbox.

    $message = “$question”;
    $mail_from = “$email”;

    $header = “from: $name < $mail_from>“;

    where do you define the variables `$question`, `$email`, `$name`, `$mail_from`, etc.? Are you sure they contain the values you expect?

Viewing 15 posts - 1 through 15 (of 20 total)

You must be logged in to reply to this topic.

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