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.
You're referencing by the ID of the field submitteremail
when you should be using the name Email
Although I still can't guarantee your email will get sent since you didn't include that portion of the code.
name is the field that populates the $_POST array so
name="Email"
should be
name="submitteremail"
OR
$submitter = $_POST['submitteremail'];
should be
$submitter = $_POST['Email'];
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.