PHP problem

i went thru the tutorial for the PHP form mailer

and it said if i change the “0” to a “1”

then my site will aoutomatically redirect…and i just get error messages

heres my code i used
frome this link
http://www.kirupa.com/web/form_mailer.htm

<?PHP 
$to = "myemail@gmail.com"; 
$subject = "Contact Us Online Form";
$headers = "From: Form Mailer";
$forward = 1;
$location = "index.html";

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



$msg = "Message submitted on $date at $time.

"; 

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

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

?>