Hi all
Like ‘olicourse’ i’m trying to get my form to redirect to a webpage (http://www.kirupa.com/forum/showthread.php?t=337218).
I want to redirect to here:
http://www.communityspiritacupuncture.co.uk/formcomplete
but no matter what I try it’s not working. I really don’t know what i’m doing wrong.
The form works fine otherwise (thanks v. much for the great tutorial )
code:
<?php
if(isset($_POST[‘submit’])){
$to = "info@communityspiritacupuncture.co.uk";
$subject = “Website Query”;
$name_field = htmlspecialchars($_POST[‘name’]);
$email_field = htmlspecialchars($_POST[‘email’]);
$message = htmlspecialchars($_POST[‘message’]);
foreach($_POST[‘check’] as $value) {
$check_msg .= "Checked: $value
";
}
$body = “From: $name_field
E-Mail: $email_field
Message:
$message
$check_msg”;
$header="From: $email_field
";
mail($to, $subject, $body);
header(“Location:formcomplete.phtml”);
} else {
echo “blarg!”;
}
?>
any help would be much appreciated.
Andy