A
Anonymous
Guest
I have a simple sign up form that is not working. I have not done a lot of PHP, so it is probably some basic mistake. could someone please take a look?
This is the form part of the Html:
mail.php:
This is the form part of the Html:
Code:
<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>
mail.php:
Code:
<?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!";
?>