- Follow via:
- RSS
- Email Alert
Question
0
Votes
Contact Form
i just uploaded the html and php code for my contact form and it returns - There has been an error, please make sure you have entered your details correctly. when i fill the form online please some pro, help me out
Tags:
development
1st Mar
Clarifications
I just started my car and it made a weird sound, please help me!!
Not really much to go on. It would probably help the mechanic to know what make, model and year of vehicle, as well as something more specific about the sound and what I was doing. The more information I provide to the mechanic, the better (s)he will be able to help.
Not really much to go on. It would probably help the mechanic to know what make, model and year of vehicle, as well as something more specific about the sound and what I was doing. The more information I provide to the mechanic, the better (s)he will be able to help.
Sven2157
1st Mar
Please some one here are the codes i used:
<form method="post" action="contactengine.php">
Name:
Tel:
Email:
Details of Quote / Query
?php
$EmailFrom = "noreply@yoursite.com"; // From email address
$EmailTo = "youremail@yoursite.com"; // Email address you want submitted forms to go to
$Subject = "YourSite.com - Contact Form Submission"; // subject line for emails
$Name = Trim(stripslashes($_POST['Name']));
$Tel = Trim(stripslashes($_POST['Tel']));
$Email = Trim(stripslashes($_POST['Email']));
$Message = Trim(stripslashes($_POST['Message']));
// validation
$validationOK=true;
if (!$validationOK) {
print "There has been an error, please make sure you entered a correct email address."; // You can edit this to your own error message
exit;
}
// prepare email body text
$Body = "";
$Body .= "Name: ";
$Body .= $Name;
$Body .= "\n";
$Body .= "Tel: ";
$Body .= $Tel;
$Body .= "\n";
$Body .= "Email: ";
$Body .= $Email;
$Body .= "\n";
$Body .= "Message: ";
$Body .= $Message;
$Body .= "\n";
// send email
$success = mail($EmailTo, $Subject, $Body, "From:
<form method="post" action="contactengine.php">
Name:
Tel:
Email:
Details of Quote / Query
?php
$EmailFrom = "noreply@yoursite.com"; // From email address
$EmailTo = "youremail@yoursite.com"; // Email address you want submitted forms to go to
$Subject = "YourSite.com - Contact Form Submission"; // subject line for emails
$Name = Trim(stripslashes($_POST['Name']));
$Tel = Trim(stripslashes($_POST['Tel']));
$Email = Trim(stripslashes($_POST['Email']));
$Message = Trim(stripslashes($_POST['Message']));
// validation
$validationOK=true;
if (!$validationOK) {
print "There has been an error, please make sure you entered a correct email address."; // You can edit this to your own error message
exit;
}
// prepare email body text
$Body = "";
$Body .= "Name: ";
$Body .= $Name;
$Body .= "\n";
$Body .= "Tel: ";
$Body .= $Tel;
$Body .= "\n";
$Body .= "Email: ";
$Body .= $Email;
$Body .= "\n";
$Body .= "Message: ";
$Body .= $Message;
$Body .= "\n";
// send email
$success = mail($EmailTo, $Subject, $Body, "From:
ynet
1st Mar
Answers (1)
0
Votes
remove validation code
You have used validation in the form codes.
This is your validation code
$validationOK=true;
if (!$validationOK) {
print "There has been an error, please make sure you entered a correct email address."; // You can edit this to your own error message
exit;
}
Unless you put correct email id it will not work.
Either put correct email address or remove this validation.
It should work fine than
This is your validation code
$validationOK=true;
if (!$validationOK) {
print "There has been an error, please make sure you entered a correct email address."; // You can edit this to your own error message
exit;
}
Unless you put correct email id it will not work.
Either put correct email address or remove this validation.
It should work fine than
5th Mar

































