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

Replies

Thanks a million Guys i will try this out now.
ynet 6th Mar
Guys i still receive this message: There has been an error, please make sure you have entered your details correctly. though i cut out // validation down to } still need help please
ynet 6th Mar
Answer the question
Formatting +
BB Codes - Note: HTML is not supported in forums
  • [b] Bold [/b]
  • [i] Italic [/i]
  • [u] Underline [/u]
  • [s] Strikethrough [/s]
  • [q] "Quote" [/q]
  • [ol][*] 1. Ordered List [/ol]
  • [ul][*] · Unordered List [/ul]
  • [pre] Preformat [/pre]
  • [quote] "Blockquote" [/quote]

Join the TechRepublic Community and join the conversation! Signing-up is free and quick, Do it now, we want to hear your opinion.