title: Form to email in PHP delivering empty values
body: <p>I'm trying to send an email with PHP using an HTML form.</p>
  
  <p>When I receive the email however, the name and email fields are always empty, I only receive the message.</p>
  
  <p>Here's the Form code: </p>
  
  <pre><code>&lt;form class="form" id="contact" action="form-to-email.php" method="post"&gt;
  &lt;input class="name" type="text" id="name" placeholder="Name" required&gt;
  &lt;input class="email" type="email" id="email" placeholder="Email" required&gt;
  &lt;input class="phone" type="text" id="phone" placeholder="Phone No:"&gt;
  &lt;textarea class="message" name="message" id="message" cols="30" rows="10"     placeholder="Message" required&gt;&lt;/textarea&gt;
  &lt;input class="submit-btn" id="submitbtn" type="submit" value="SUBMIT"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>And PHP Code:</p>
  
  <pre><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);
  </code></pre>