title: PHP Contact Form Not Sending Email
body: <p>I'm writing to create a contact form on my website and then get the information sent to my inbox, however it is not working whatsoever. Please take a look at my code below (PHP is not my thing) and let me know where i've gone wrong. </p>
  
  <p>Here's the PHP script:</p>
  
  <pre><code>&lt;?php
  
  $to = 'example@gmail.com';
  $name = $_POST['name'];
  $email = $_POST['email'];
  $message = $_POST['message'];
  $tel = $_POST['tel'];
  $project = $_POST['project'];
  $range1 = $_POST['range1'];
  $range2 = $_POST['range2'];
  
  $body = &lt;&lt;&lt;EMAIL
  
  Hi, my name is $name.
  
  I'd like to discuss the possibility of working together on a $project.
  
  My budget for the project is £$range1 and I would like to complete the project within $range2 Month(s).
  
  Additional Information:
  $message
  
  Regards, $name
  
  &lt;hr&gt;
  $name
  $email
  $tel
  
  EMAIL;
  
  $header = "From: $email";
  
  if($_POST['send']){
  mail($to, $subject, $body, $header);
  $feedback = 'Thank you for your message, we will get back to you shortly.';
  }
  
  ?&gt;
  </code></pre>
  
  <p>And here's the HTML form:</p>
  
  <pre><code>&lt;form id="form_id" name="form_name" action="" method="post"&gt;
  
    &lt;div&gt;
  &lt;input type="text" name="name" id="name" placeholder="Name" required/&gt;
    &lt;/div&gt;
  &lt;div&gt;
  &lt;input type="email" name="email" id="email" placeholder="Email" required/&gt;
    &lt;/div&gt;
  &lt;div&gt;
  &lt;input type="tel" name="tel" id="tel" placeholder="Phone" required/&gt;
    &lt;/div&gt;
  
  &lt;div&gt;
    &lt;select required id="project"&gt;
  &lt;option selected&gt;Select type of project…&lt;/option&gt;
  &lt;option value="Responsive Website"&gt;Responsive Web Design&lt;/option&gt;
  &lt;option value="Graphic Design"&gt;Graphic Design&lt;/option&gt;
  &lt;option value="Motion Graphics"&gt;Motion Graphics&lt;/option&gt;
    &lt;/select&gt; 
  &lt;/div&gt;
  
    &lt;div&gt;
  &lt;label for="range1"&gt;Budget: &lt;/label&gt;
  &lt;input type="range" name="range1" id="range1" min="400" max="2000" step="50" value="6" required onchange="rangevalue.value=value"&gt;&lt;output id="rangevalue"&gt;400&lt;/output&gt;
    &lt;/div&gt;
  
  &lt;div&gt;
  &lt;label for="range2"&gt;Timeframe: &lt;/label&gt;
  &lt;input type="range" name="range2" id="range2" min="1" max="12" step=".5" value="1" required onchange="rangevalue1.value=value"&gt;&lt;output id="rangevalue1"&gt;1&lt;/output&gt;
    &lt;/div&gt;
  
  &lt;div&gt;
  &lt;label for="message"&gt;Additional Information: &lt;/label&gt;&lt;br/&gt;
  &lt;p&gt;(Please use this space to tell us about your company, the main objectives of the proposed website and anything else you think might be useful)&lt;/p&gt;
  &lt;textarea name="message" id="message" rows="5" cols="30" placeholder="Message" required&gt;&lt;/textarea&gt;
    &lt;/div&gt;
  
  &lt;div&gt;
  &lt;input type="submit" name="submit" value="submit" /&gt;
    &lt;/div&gt;
  
  &lt;/form&gt;
  &lt;p id="feedback"&gt;&lt;?php echo $feedback; ?&gt;&lt;/p&gt;
  </code></pre>
  
  <p>Thanks for the help. FYI this can be achieved easily with WordPress through Contact Form 7 (or a similar plugin).</p>