title: PHP auto send email
body: <p>The page doesn't load. I am trying to send an email from my PHP code. This is for auto-sending an email for a charity organization.                                                                                                                            </p>
  
  <p>`
  
  <pre><code>$name = $_POST['name'];
  $message = $_POST['message'];
  
  $message = &lt;&lt;&lt;EMAIL
  
  $name
  
  $message
  
  EMAIL;
  
  $header = 'hi';
  if($_POST){
  mail($to, $subject, $message, $header)
  $feedback = "Email Sent!";
  }
  
  ?&gt;
  
  &lt;!DOCTYPE html&gt;
  &lt;body&gt;
  &lt;p id = "feedback"&gt;&lt;?php echo $feedback; ?&gt;&lt;/p&gt;
  &lt;form action = "emailtest.php" method = "POST"&gt;
  &lt;label for = "name"&gt;Name: &lt;/label&gt;
  &lt;input type = "text" name = "name" id = "name" /&gt; &lt;br /&gt;
  &lt;label for = "message"&gt; Enter a Message: &lt;/label&gt;
  &lt;textarea id = "message" name = "message" cols = "42" row = "9"&gt;&lt;/textarea&gt; &lt;br /&gt;
  &lt;input type = "submit" value = "Send Email"&gt;
  
  &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;`
  </code></pre>