Hey Guys,
I am having some trouble with this form. Can anyone assist:
<?php
// get posted data into local variables
$EmailFrom = "info@wearededicated.me.uk";
$EmailTo = "info@wearededicated.me.uk";
$Subject = "Contact";
$Name = Trim(stripslashes($_POST['Name']));
$Tel = Trim(stripslashes($_POST['Tel']));
$Mobile = Trim(stripslashes($_POST['Mobile']));
$Fax = Trim(stripslashes($_POST['Fax']));
$comm = Trim(stripslashes($_POST['comm']));
// validation
$validationOK=true;
if (!$validationOK) {
print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">";
exit;
}
// prepare email body text
$Body = "";
$Body .= "Name: ";
$Body .= $Name;
$Body .= "\n";
$Body .= "Tel: ";
$Body .= $Tel;
$Body .= "\n";
$Body .= "Mobile: ";
$Body .= $Mobile;
$Body .= "\n";
$Body .= "Fax: ";
$Body .= $Fax;
$Body .= "\n";
$Body .= "comm: ";
$Body .= $comm;
$Body .= "\n";
// send email
$success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>");
// redirect to success page
if ($success){
print "<meta http-equiv=\"refresh\" content=\"0;URL=ok.htm\">";
}
else{
print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">";
}
?>
Solved! Go to Solution.
not sure why it is not working to be honest.
However, you can download a pretty decent PHP form script from the following page, and it does work with BT's server.
http://www.freecontactform.com/free.php
not sure why it is not working to be honest.
However, you can download a pretty decent PHP form script from the following page, and it does work with BT's server.
http://www.freecontactform.com/free.php