I'm trying to send an email with PHP using an HTML form.

When I receive the email however, the name and email fields are always empty, I only receive the message.

Here's the Form code: 

```
<form class="form" id="contact" action="form-to-email.php" method="post">
<input class="name" type="text" id="name" placeholder="Name" required>
<input class="email" type="email" id="email" placeholder="Email" required>
<input class="phone" type="text" id="phone" placeholder="Phone No:">
<textarea class="message" name="message" id="message" cols="30" rows="10"     placeholder="Message" required></textarea>
<input class="submit-btn" id="submitbtn" type="submit" value="SUBMIT">
</form>

```

And PHP Code:

```
$myemail = 'example@gmail.com';//myemail
$name =filter_input(INPUT_POST, 'name');
$email_address = filter_input(INPUT_POST, 'email');
$message = filter_input(INPUT_POST, 'message');

$to = $myemail;

$email_subject = "Contact form submission: $name";

$email_body = "You have received a new message. ".

" Here are the details:\n Name: $name \n ".

"Email: $email_address\n Message: \n $message";

$headers = "From: $myemail\n";

$headers .= "Reply-To: $email_address";

mail($to,$email_subject,$email_body,$headers);

```