Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End CONTACT FORM not working … please help!!

  • This topic is empty.
Viewing 15 posts - 1 through 15 (of 20 total)
  • Author
    Posts
  • #41556
    hendrix940
    Participant

    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.

    #118728
    chrisburton
    Participant

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

    #118729
    hendrix940
    Participant

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

    #118730
    hendrix940
    Participant

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

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

    $to = “[email protected]

    $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.”;
    }
    ?>

    #118731
    hendrix940
    Participant

    Okay, that’s my PHP

    #118732
    hendrix940
    Participant




    #118733
    chrisburton
    Participant

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

    #118734
    hendrix940
    Participant

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

    #118735
    hendrix940
    Participant

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

    #118736
    hendrix940
    Participant

    Thank you sir. Above is line 33.

    #118737
    chrisburton
    Participant

    @hendrix940 What’s this about?

    $to = “[email protected]

    Shouldn’t it be:

    $to = “[email protected]”;

    #118738
    hendrix940
    Participant

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

    #118739
    hendrix940
    Participant

    @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.

    #118740
    __
    Participant

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

    #118741
    __
    Participant

    > …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)
  • The forum ‘Back End’ is closed to new topics and replies.