contact-form.php:
<?php
function contact($name, $email, $comments, $return) {
if ($name == "") $name = "undefined";
if ($email == "") $email = "undefined";
if ($comments != "") {
$date = date("d-m-y");
mail ("you@host.net","syst3m :: site feed-back","The following was submitted by $REMOTE_ADDR on $date. Their name is \"$name\" and their email is \"$email\":\n\r\n\r$comments","from: $email ($name)");
header("location:$return");
}
elseif ($comments == "") header("location:blank-contact.php");
else header("location:error-contact.php");
}
contact ($name, $email, $comments, $return);
?>
<html>
<head>
<title>syst3m :: contact</title>
</head>
<body>
<a href="http://members.lycos.co.uk/syst3m1337/index.php">syst3m :: home</a>
</body>
</html>
It looks like it should work to me. I can't figure out what's wrong. After the form is submitted (this page is used as the action, the form is on another page), contact-form.php never forwards to any of the pages. If the data is recieved, the page is SUPPOSED to go to thankyou.php but it's not. Please help!
The emails go to my email, so that part works fine. The forwarding part doesn't work.