好的,所以我想在填写完联系表后重定向到感谢页面。现在,它只是一个普通的、没有样式的谢谢,我希望它重定向到我设计的名为contact-thank-you.html的页面
这是我的 HTML 表单:
<form action="form_processor.php" method="post" >
Name:<br /><input type="text" name="name" required="required" /><br /><br />
E-mail:<br /><input type="text" name="email" required="required" /><br /><br />
Message:<br /><textarea name="message" required="required"></textarea><br /><br />
<input type="submit" value="Submit">
</form>
这是form_processor.php:
$to = 'myemail@email.com';
$subject = "New Message From Your Website";
$message = $_POST['message'];
$headers = 'From: ' . $_POST['name'] . ' <myemail@email.com>' . "\r\n" .
'Reply-To: myemail@email.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, $headers);
echo "Thank you, you message has been sent!";