繁体   English   中英

无法将数据从表格发送到电子邮件

[英]Can't get data from Form to Email

我有一个简单的表单,并且尝试了所有操作,从更改POST到GET到REQUEST。 单引号,双引号。 EOD ...无济于事。 我得到确认页面,在电子邮件中得到主题和文本,但没有数据。 请帮忙!!

signup.html

<form action="/signupprocess.php" method="post" enctype="text/plain" name="signup"
 target="_blank" id="signup">
<input name="email" type="text" id="email" size="35" maxlength="90">
<input name="name" type="text" id="name" size="35" maxlength="80">
<input name="address" type="text" id="address" size="35" maxlength="90">

signupprocess.php

$email = $_POST['email'];
$name = $_POST['name'];
$address = $_POST['address'];
$phone = $_POST['phone'];
$account = $_POST['account'];
$authorize = $_POST['authorize'];

$body = <<<EOD
Name: $name <br>
Address: $address <br>
Phone Number: $phone <br>
Account: $account <br>
Authorize: $authorize <br>
EOD;

$headers = "From: $to\r\n";
$headers .= "Content-type: text/html\r\n";

mail($to, $subject, $body, $headers);
echo '<META HTTP-EQUIV=Refresh CONTENT="0; URL='.$url.'">';

摆脱<form>中的enctype属性

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM