Hey guys,
Im putting together my site as I mentioned earlier. I got my under construction page up and I managed to set up the email form. The emaisl arrive in my inbox no problem, but im having a little issue. When I input the email and click send i get the email but the only thing the email contains is the following "email:"
Why doesn't the email address they input show up in the email body? I have the code pasted below..
Website: http://ift.tt/1Qxmtj0
Codes below: The codes are not formatted in the text but they are in the html/php files.
HTML Code <form method="post" id="contact" class="clearfix" action="subscribe.php"> <input class="sb-search-input" placeholder="Enter email ..." type="text" value="" name="email"> <input class="sb-search-submit" value="" type="submit" name="email1"> <button class="formbutton" type="submit"><span class="fa fa-envelope-o"></span></button> </form>
PHP Code <?php
CONFIG
LIST EMAIL ADDRESS
$recipient = "admin@dialedinphysique.com";
SUBJECT (Subscribe/Remove)
$subject = "Please Subscribe to the Newsletter";
RESULT PAGE
$location = "http://ift.tt/1Qxmtj0";
FORM VALUES
SENDER - WE ALSO USE THE RECIPIENT AS SENDER IN THIS SAMPLE
DON'T INCLUDE UNFILTERED USER INPUT IN THE MAIL HEADER!
$sender = $recipient;
MAIL BODY
$body .= "Email: ".$_REQUEST['Email']." \n";
SEND MESSGAE
mail( $recipient, $subject, $body, "From: $sender" ) or die ("Mail could not be sent.");
SHOW RESULT PAGE
header( "Location: $location" ); ?>
Epic visual tool
Epson 5030UB 2D/3D 1080p 3LCD Projector
No comments:
Post a Comment