1

I am trying to figure out what is wrong with the PHP code that it is not sending copies to the form submitter. I have the following in my php file;

$submitter = $_POST['submitteremail'];
if ($submitter == '') $submitter = 'info@info.com';
if (strstr($submitter, "\n") || strlen($submitter) > 50) die("Begone, foul spammer.");

And then I have this <input type="hidden" name="submitteremail" value="yes"> in the html for the form. And this for the email text box

<p><label>Email: <span class="style34">___</span></label> <input name="Email" type="text" id="submitteremail" size="51"/></p>

From everything I know, which admittedly isn't a lot, this should work. I only have a very basic knowledge of PHP, so please go easy on me in your replies.

Thank you from the bottom of my heart for any help any of you can provide.

4

2 回答 2

0

submitteremail当您应该使用名称时,您通过字段的 ID 进行引用Email

虽然我仍然不能保证你的电子邮件会被发送,因为你没有包含那部分代码。

于 2013-02-07T19:07:58.043 回答
0

name 是填充 $_POST 数组的字段,所以

name="Email"

应该

name="submitteremail"

或者

$submitter = $_POST['submitteremail'];

应该

$submitter = $_POST['Email'];
于 2013-02-07T19:08:07.060 回答