I've got a simple contact form in PHP that is to send a form input to the email address. However, the textarea isn't included. The name and e-mail is being sent, but the textarea is blank.
My form:
<form method="post" action="contact.php" id="form" role="form" class="form contact-form">
<!-- Form Heading -->
<h3 class="small-section-heading align-center">I'm always open to talk</h3>
<!-- Name -->
<div class="form-group">
<input type="text" name="name" id="name" class="form-control" placeholder="Name" pattern=".{2,100}" required>
</div>
<!-- Email -->
<div class="form-group">
<input type="email" name="email" id="email" class="form-control" id="" placeholder="Email" pattern=".{5,100}" required>
</div>
<!-- Message -->
<div class="form-group">
<textarea name="message" id="message" class="form-control" rows="6" placeholder="Message"></textarea>
</div>
<!-- Send Button -->
<button type="submit" class="btn btn-spacia btn-medium btn-full">
Send
</button>
</form>
My PHP Contact form:
<?php
$name=$_POST['name'];
$email=$_POST['email'];
$message=$_POST['message'];
$from="From: $name<$email>\r\nReturn-path: $email";
$subject="Message sent using your contact form";
mail("email@example.com", $subject, $message, $from);
?>
Thank you for contacting us. We will be in touch with you very soon.
<?php
}
?>