Grow your CSS skills. Land your dream job.

Nice and Simple Contact form error

  • # April 12, 2013 at 10:20 am

    I am new to php and just wanted a simple contact form so downloaded the “Nice and Simple” one.

    I have downloaded it and added it into my page but when i click send i keep getting directed to the error page and no emails are arriving.

    PHP ….

    < ?php

    $EmailFrom = “jasonnaylor83@gmail.com”;
    $EmailTo = “jasonnaylor83@gmail.com”;
    $Subject = “Website Contact Form”;
    $Name = Trim(stripslashes($_POST));
    $Telephone = 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 .= “Telephone”;
    $Body .= $Telephone;
    $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 ““;
    }
    ?>

    HTML….

    Telephone:

    Message:

    This is the error message i get

    “The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.”

    __
    # April 12, 2013 at 1:24 pm

    Are you sure the form’s `action` is correct?

    # April 15, 2013 at 4:27 am

    Yes, it is still the same php file “contactengine.php”

    __
    # April 15, 2013 at 10:40 am

    Don’t know, then. The message you gave isn’t coming from your script. It sounds like a 404 (not found) message.

    # April 15, 2013 at 11:09 am

    Maybe nothing but you sure the contactengine.php is in the right folder?

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

You must be logged in to reply to this topic.

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