【发布时间】:2016-02-24 17:35:12
【问题描述】:
我正在创建一个电子邮件系统,所以我做了这个小测试花絮,它可以工作......有点?
<html>
<head><title>EMail Test</title></head>
<body>
<input type="text" name="email">
EMail (required)
<br><br>
<textarea name="comment" rows="5" cols="40"></textarea> what's your problem?
<br><br>
<form method="POST" action=''>
<input type="submit" name="button1" value="Submit">
</form>
<?php
if (isset($_POST['button1'])) {
$msg=$_POST['email']." asks: ".$_POST['comment'];
echo $msg;
$email=$_POST['email'];
$SupportNinga="Typhoone01@gmail.com";
$mail=mail($SupportNinga,"Question from ".$email,$msg);
echo "Emailing...";
if($mail) {
echo"E-mail sent sucessfully";
}
}
?>
</body>
</html>
这被放入在线主机中,但似乎不起作用。
它发送了电子邮件,但它只是说“问题来自 - 询问:”。我可以看出它没有正确读取 $_POST。
已获得帮助。 :P
【问题讨论】: