Hi guys,
im a total rookie at PHP but am doing a web site for my dad and he wants a contact form. i managed to generate the following php off a web site, but cant seem to find where i put in my redirection pages after the submit button has been clicked. maybe someone could help me out
<?php
// Website Contact Form Generator
// http://www.tele-pro.co.uk/scripts/contact_form/
// This script is free to use as long as you
// retain the credit link
// get posted data into local variables
$EmailFrom = "email@designproduct.co.uk";
$EmailTo = "email@designproduct.co.uk";
$Subject = "Web Enquiry";
$Name = Trim(stripslashes($POST['Name']));
$Tel = Trim(stripslashes($POST['Tel']));
$EmailAddress = Trim(stripslashes($POST['EmailAddress']));
$Message = Trim(stripslashes($POST['Message']));
// 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 .= "EmailAddress: ";
$Body .= $EmailAddress;
$Body .= "\n";
$Body .= "Message: ";
$Body .= $Message;
$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\">";
}
?>
thanks in advance