One of the most common questions that people as is how to redirect the "PHP Contact Form". And since people either fail at searching or are just to lazy here's how you do it. Here's the final code from the tutorial:
change
to
PHP Code:
<?php
if(isset($_POST['submit'])) {
$to = "you@you.com";
$subject = "Form Tutorial";
$name_field = $_POST['name'];
$email_field = $_POST['email'];
$message = $_POST['message'];
$body = "From: $name_field\n E-Mail: $email_field\n Message:\n $message";
echo "Data has been submitted to $to!";
mail($to, $subject, $body);
} else {
echo "blarg!";
}
?>
PHP Code:
echo "Data has been submitted to $to!";
PHP Code:
header("Location: http://www.yourpage.com");






Linear Mode

