Thanks to Sid, he helped me get my form working. Right now, when I click submit on my form, it takes me to a page that says, "Thank You for subscribing. Click back to Return to DanaLittleton.com". Then they have to click back to return to the form page. Below is my code. How can I edit the code to where when they click submit, they are redirected to www.danalittleton.com/thankyou.html? I'm assuming I need to replace the line that says, "print("Thank You for subscribing. Click back to Return to DanaLittleton.com");", but what do I replace it with?
<?php
$email = $POST["email"];
$address = $POST["address"];
$citystate = $POST["citystate"];
$zip = $POST["zip"];
$headers = "From: " . $POST["email"];
$name = $POST["name"];
$subject = "Please Subscribe me to the DanaLittleton.com Newsletter"; // your webpage
$time = date("l d F Y @ H:i");
$to = "youthman@soleministries.org"; // your email
$message2 = "\nName: " . $name . "\nEmail: " . $email . "\nAddress: " . $address . "\nCity/State: " . $citystate . "\nZip: " . $zip ;
if ($email) {
if (mail($to, $subject, $message2, $headers)) {
print("Thank You for subscribing. Click back to Return to DanaLittleton.com");
}
else {
print("The server encountered an unexpected condition which prevented it from fulfilling the request.");
}
}
else {
print("Please fill out all fields.");
}
?>