Hello,

I was pointed to this nice little contact form by a forum member and it is working well but I would like to change the message after the submit button is pressed.

Right now, a white page come up with a message stating thank you, we will get back to you as soon as possible. But there is no link back to the previous page or homepage.

Does anybody know what script I would add to get a link back to the previous page?

Or is there a simple way to have it return automatically after 10 seconds?

Here is the code for the contact form:

<?PHP
$to = "youremail@wherever.com";
$subject = "Contact Form response";
$headers = "From: Form Mailer";
$forward = 0;
$location = "";

$date = date ("l, F jS, Y");
$time = date ("h:i A");



$msg = "Below is a message from your contact form submitted on $date at $time.\n\n";

if ($_SERVER['REQUEST_METHOD'] == "POST") {
foreach ($_POST as $key => $value) {
$msg .= ucfirst ($key) ." : ". $value . "\n";
}
}
else {
foreach ($_GET as $key => $value) {
$msg .= ucfirst ($key) ." : ". $value . "\n";
}
}

mail($to, $subject, $msg, $headers);
if ($forward == 1) {
header ("Location:$location");
}
else {
echo "Thank you for contacting us. We will get back to you as soon as possible.";
}

?>


Thanks for your help for the code-challenged!