This is the form part of the Html:
Code: Select all
<form id="signup-form" method="post" action="mail.php">
<input type="text" name="name" id="name" placeholder="Full Name" />
<input type="email" name="email" id="email" placeholder="Email Address" />
<input type="submit" value="Send" />
</form>
Code: Select all
<?php
$name = $_POST['name'];
$email = $_POST['email'];
$formcontent="From: $name";
$recipient = "mail@mydomain.com";
$subject = "Karl's Sign Up";
$mailheader = "From: $email \r\n";
$mailheader .= "Reply-To: $email \r\n";
mail($recipient, $subject, $formcontent, $mailheader) or die("Error!");
echo "Thank You!";
?>