有人可以帮助我尝试通过电子邮件从我的表格中通过电子邮件发送 4 个单选框的结果。我收到电子邮件很好,但没有收到通过发送的结果。
有人可以告诉我我做错了什么吗?
html表单:
<html>
<head>
<title>Site Feedback</title>
</head>
<body>
<form name="myform" action="send_feedback.php" method="POST">
<div class="wrapper_feedback" align="left">
<p>Website Design:</p>
<input type="radio" name="design" value="design1">
1
<input type="radio" name="design" value="design2">
2
<input type="radio" name="design" value="design3" checked>
3
<input type="radio" name="design" value="design4">
4
<input type="radio" name="design" value="design5">
5
</p>
<hr>
<p>Ease of Use:</p>
<input type="radio" name="easeuse" value="ease1">
1
<input type="radio" name="easeuse" value="ease2">
2
<input type="radio" name="easeuse" value="ease3" checked>
3
<input type="radio" name="easeuse" value="ease4">
4
<input type="radio" name="easeuse" value="ease5">
5
</p>
<hr>
<p>Fit for Purpose:</p>
<input type="radio" name="purpose" value="purpose1">
1
<input type="radio" name="purpose" value="purpose2">
2
<input type="radio" name="purpose" value="purpose3" checked>
3
<input type="radio" name="purpose" value="purpose4">
4
<input type="radio" name="purpose" value="purpose5">
5
</p>
<hr>
<p>Layout:</p>
<input type="radio" name="layout" value="layout1">
1
<input type="radio" name="layout" value="layout2">
2
<input type="radio" name="layout" value="layout3" checked>
3
<input type="radio" name="layout" value="layout4">
4
<input type="radio" name="layout" value="layout5">
5
</p>
<input type="submit" action="submit" value="submit" name="submit">
<br>
</div>
</form>
</body>
</html>
php:
<?php ob_start(); ?>
<?php
/* Set e-mail recipient */
$myemail = "info@mydomain.com";
$subject = "site Feedback";
/* Let's prepare the message for the e-mail */
$message = "somesite.com Feedback
$design
$easeuse
$purpose
$layout
End of message
";
/* Send the message using mail() function */
mail($myemail, $subject, $message);
/* Redirect visitor to the thank you page */
$_SESSION['feedback']="<div class=\"infobox-index\"><strong>Thank You</strong> - We appreciate you taking the time to tell us what you think.</div>";
header("Location: {$_SERVER['HTTP_REFERER']}");
exit();
?>
<?php ob_end_flush() ?>