- This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
Viewing 5 posts - 1 through 5 (of 5 total)
- The forum ‘Back End’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
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….
This is the error message i get
“The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.”
Are you sure the form’s `action` is correct?
Yes, it is still the same php file “contactengine.php”
Don’t know, then. The message you gave isn’t coming from your script. It sounds like a 404 (not found) message.
Maybe nothing but you sure the contactengine.php is in the right folder?