我有一个简单的表单,我已经尝试了一切,从更改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.'">';
答案 0 :(得分:0)
摆脱enctype
<form>
属性