我需要一種簡單的方式來重定向(PHP)表單提交後,謝謝你的頁面。PHP表單重定向
我的PHP:
<?php $name = $_POST['name'];
$email = $_POST['email'];
$message = $_POST['message'];
$formcontent="From: $name \n Message: $message";
$recipient = "[email protected]";
$subject = "Contact Form";
$mailheader = "From: $email \r\n";
mail($recipient, $subject, $formcontent, $mailheader) or die("Error!");
echo "Thank You!";
?>
我的HTML(我不想改變)
<form action="mail.php" method="POST" autocomplete="on"></br>
<p>Name:</p><input type="text" name="Name" size="20"></br>
<p>Email:</p><input type="text" name="email" size="20"></br>
<p>Message:</p><textarea id="styled" type="textarea" name="message" form="input">
</textarea></br>
<pre><input type="submit" value="Send"><input type="reset" value="Clear"></pre>
</form>
任何幫助嗎?感謝