Hypertext
18-12-2006, 05:02 PM
PHP Needed pls check this id be very happy if u could validate it for me thx in advance
<?php
// get posted data into local variables
$EmailFrom = "[email protected]";
$EmailTo = "[email protected]";
$Subject = "Quote Request";
$Name = Trim(stripslashes($_POST['Name']));
$Email = Trim(stripslashes($_POST['Email']));
$Details = Trim(stripslashes($_POST['Details']));
// 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 .= "Email: ";
$Body .= $Email;
$Body .= "\n";
$Body .= "Details: ";
$Body .= $Details;
$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\">";
}
?>
Thx in advance ;)
Thread Moved by J1MI (Forum Moderator) - From website designing, please post in the correct section next time. thanks. :)
<?php
// get posted data into local variables
$EmailFrom = "[email protected]";
$EmailTo = "[email protected]";
$Subject = "Quote Request";
$Name = Trim(stripslashes($_POST['Name']));
$Email = Trim(stripslashes($_POST['Email']));
$Details = Trim(stripslashes($_POST['Details']));
// 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 .= "Email: ";
$Body .= $Email;
$Body .= "\n";
$Body .= "Details: ";
$Body .= $Details;
$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\">";
}
?>
Thx in advance ;)
Thread Moved by J1MI (Forum Moderator) - From website designing, please post in the correct section next time. thanks. :)