Forums

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

Home Forums Back End Nice and Simple Contact form error

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #44065
    JasonNaylor
    Member

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

    $EmailTo = “[email protected]”;
    $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.”

    #131603
    __
    Participant

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

    #131796
    JasonNaylor
    Member

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

    #131845
    __
    Participant

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

    #131854
    CrocoDillon
    Participant

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

Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘Back End’ is closed to new topics and replies.