【发布时间】:2012-01-11 12:14:49
【问题描述】:
我不懂 PHP。
我不希望用户在发送表单后转到http://www.example.com/feedback-thanks.html。我想要的是发送按钮下方的文本或任何无需刷新页面。
我删除了header( "Location: http://www.example.com/feedback-thanks.html" );,但我没有收到电子邮件并且用户被重定向到feedback.php... :(
html
<form method="post" action="feedback.php">
<input name="email" type="email"/>
<textarea name="message" id="feedback-textarea" autofocus="autofocus" required="required" ></textarea>
<button type="submit" id="feedback-button-send">send</button>
</form>
feedback.php
<?php
$email = $_REQUEST['email'] ;
$message = $_REQUEST['message'] ;
mail( "abcde@gmail.com", "Subject Here",
$message, "From: $email" );
header( "Location: http://www.example.com/feedback-thanks.html" );
?>
【问题讨论】:
标签: php html html-email