title: My php Contact Form on Website isn't Working
body: <p>My php Contact Form on my website isn't working. The template is from bootstrap. How do i get/build the PHP/AJAX needed for my form to work correctly? What else am i missing? This is my contact.php form. I welcome any feedback! Thanks</p>
  
  <pre><code>    &lt;?php
  if(!empty($_POST["send"])) {
      $name = $_POST["Name"];
      $email = $_POST["Email"];
      $subject = $_POST["subject"];
      $content = $_POST["content"];
  
      $toEmail = "admin@examplewebsite.com";
      $mailHeaders = "From: " . $name . "&lt;". $email ."&gt;\r\n";
      if(mail($toEmail, $subject, $content, $mailHeaders)) {
          $message = "Your contact information is received successfully.";
          $type = "success";
      }
  }
  require_once "contact-view.php";
  ?&gt;
  </code></pre>
  
  <p>Here's a copy of my contact.html code</p>
  
  <pre><code>&lt;div class="col-lg-6"&gt;
              &lt;form action="forms/contact.php" method="post" role="form" class="php-email-form"&gt;
                &lt;div class="form-row"&gt;
                  &lt;div class="col-md-6 form-group"&gt;
                    &lt;input type="text" name="name" class="form-control" id="name" placeholder="Your Name" data-rule="minlen:4" data-msg="Please enter at least 4 chars" /&gt;
                    &lt;div class="validate"&gt;&lt;/div&gt;
                  &lt;/div&gt;
                  &lt;div class="col-md-6 form-group"&gt;
                    &lt;input type="email" class="form-control" name="email" id="email" placeholder="Your Email" data-rule="email" data-msg="Please enter a valid email" /&gt;
                    &lt;div class="validate"&gt;&lt;/div&gt;
                  &lt;/div&gt;
                &lt;/div&gt;
                &lt;div class="form-group"&gt;
                  &lt;input type="text" class="form-control" name="subject" id="subject" placeholder="Subject" data-rule="minlen:4" data-msg="Please enter at least 8 chars of subject" /&gt;
                  &lt;div class="validate"&gt;&lt;/div&gt;
                &lt;/div&gt;
                &lt;div class="form-group"&gt;
                  &lt;textarea class="form-control" name="message" rows="5" data-rule="required" data-msg="Please write something for us" placeholder="Message"&gt;&lt;/textarea&gt;
                  &lt;div class="validate"&gt;&lt;/div&gt;
                &lt;/div&gt;
                &lt;div class="mb-3"&gt;
                  &lt;div class="loading"&gt;Loading&lt;/div&gt;
                  &lt;div class="error-message"&gt;&lt;/div&gt;
                  &lt;div class="sent-message"&gt;Your message has been sent. Thank you!&lt;/div&gt;
                &lt;/div&gt;
                &lt;div class="text-center"&gt;&lt;button type="submit"&gt;Send Message&lt;/button&gt;&lt;/div&gt;
              &lt;/form&gt;
            &lt;/div&gt;
  </code></pre>