Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #13674

    I’ve tried to see where I add my e-mail address in the send.php form and just cant figure this out so I can send the form. Please advise.

    Thanks!

    Jesse James

    http://www.savethecathouse.org

    #80122

    Hi Jesse James,

    In your WordPress Dashboard go to Display Options > Contact Options and type your email address in the space provided.

    Regards,

    Mya

    #80123

    I just have HTML & PHP files it’s not a WordPress site. Thanks for responding Mya.

    #80124

    This is the code in my send.php file.

    <?php

    if(isset($_POST)){

    $error = false;

    $the_name = $_POST;

    $the_email = $_POST;

    $the_website = $_POST;

    $the_message = $_POST;

    if(!checkmymail($the_email))

    {

    $error = true;

    $the_emailclass = “error”;

    }else{

    $the_emailclass = “valid”;

    }

    if($the_name == “”)

    {

    $error = true;

    $the_nameclass = “error”;

    }else{

    $the_nameclass = “valid”;

    }

    if($the_message == “”)

    {

    $error = true;

    $the_messageclass = “error”;

    }else{

    $the_messageclass = “valid”;

    }

    if($error == false)

    {

    $to = $_POST;

    $subject = “New Message from ” . $_POST;

    $header = ‘MIME-Version: 1.0′ . “rn”;

    $header .= ‘Content-type: text/html; charset=utf-8′ . “rn”;

    $header .= ‘From:’. $_POST . ” rn”;

    $the_message = nl2br($the_message);

    $message = “New message from $the_name

    Mail: $the_email

    Website: $the_website

    Message: $the_message
    “;

    mail($to,

    $subject,

    $message,

    $header);

    if(isset($_POST)){

    echo”<h3>Your message has been sent!</h3><p> Thank you!</p>”;

    }

    }

    }

    function checkmymail($mailadresse){

    $email_flag=preg_match(“!^w[w|.|-]+@w[w|.|-]+.[a-zA-Z]{2,4}$!”,$mailadresse);

    return $email_flag;

    }

    ?>

    #80125
Viewing 5 posts - 1 through 5 (of 5 total)

The topic ‘Sending my message from contact form not working’ is closed to new replies.