I have a problem with my contact form that I have created. When the user clicks on the send email button, I receive the email with a header, but I can't see the user's input.
So basically I am able to see the header($subject) and the pre written text("This is an automated message"), but I am not able to see the contents of $email and $message. What could be wrong?
<?php
$email = $_POST['email'];
$message = $_POST['message'];
$to = "test@testemail.com";
$subject = "New Message!"; $body = "This is an automated message. Please do not reply to this email. \n\n $email \n\n $message";
mail($to, $subject, $body); echo "Message Sent.";
?>
<form id="contact-me-form" action="contact.php" name="contact_form "method="post">
<input type="text" name="email" placeholder="Email Address">
<textarea name="message" placeholder="Type Your Message Here"></textarea>
<input id="sendEmail" type="submit" name="submit" value="Send">
</form>