note 116637 rejected from faq by salathe
| From: | salathe@php.net | Date: | Fri, 06 Feb 2015 13:37:56 +0000 |
| Subject: | note 116637 rejected from faq by salathe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-201644@lists.php.net to get a copy of this message | ||
Note Submitter: info at kevinakins dot me
----
I have designed a landing page for one of my clients, a musician in Hollywood. We want to start a
subscribers list, but the issue I am having is NOT sending the email to the proper email address,
but showing the content of the email after it's been sent and received. Using the mail()
function, I've successfully sent the mail using variables $to and $subject, but for the open
fields any viewers of the site can type in ($name and $email), those two fields do not show up in
the email. Instead, after the email is sent and received, ON THE RECEIVING END, the email reads
"No content found in this email." What am I missing? Here is the PHP I have setup and the
form as well:
<?php
$to = 'subscribertoreese@gmail.com';
$subject = 'Subscriber Data';
$name = $_POST["name"];
$email = $_POSt["email"];
mail($to,$subject,$email,$name);
?>
<form>
<label for "name">
<input type="text" name="name" id="name"
placeholder="Name">
</label>
<label for "email">
<input type="email" name="email" id="email"
placeholder="Email">
</label>
<input class="btn" type="submit" value="Subscribe">
</form>