title: My contact form does not work, submit button is not functioning
body: <p>I am using a Bootstrap theme for my portfolio website. As far as I know, I changed all the parameters in the default php- and js-files in order for my contact form to work. I also made sure I have the correct settings in my server. However, when I press the submit button, it does not send anything. I'm also not receiving any sort of error message. 
  Any idea where I went wrong/how to fix this issue?</p>
  
  <p>In Javascript:</p>
  
  <pre><code>    $(function() {
  
    $("#contactForm input,#contactForm textarea").jqBootstrapValidation({
      preventSubmit: true,
      submitError: function($form, event, errors) {
      },
      submitSuccess: function($form, event) {
        event.preventDefault(); 
        var name = $("input#name").val();
        var email = $("input#email").val();
        var phone = $("input#phone").val();
        var message = $("textarea#message").val();
        var firstName = name; // For Success/Failure Message
        if (firstName.indexOf(' ') &gt;= 0) {
          firstName = name.split(' ').slice(0, -1).join(' ');
        }
        $this = $("#sendMessageButton");
        $this.prop("disabled", true); 
        $.ajax({
          url: "././mail/contact_me.php",
          type: "POST",
          data: {
            name: name,
            phone: phone,
            email: email,
            message: message
          },
          cache: false,
          success: function() {
            // Success message
            $('#success').html("&lt;div class='alert alert-success'&gt;");
            $('#success &gt; .alert-success').html("&lt;button type='button' class='close' data-dismiss='alert' aria-hidden='true'&gt;&amp;times;")
              .append("&lt;/button&gt;");
            $('#success &gt; .alert-success')
              .append("&lt;strong&gt;Your message has been sent. &lt;/strong&gt;");
            $('#success &gt; .alert-success')
              .append('&lt;/div&gt;');
            //clear all fields
            $('#contactForm').trigger("reset");
          },
          error: function() {
            $('#success').html("&lt;div class='alert alert-danger'&gt;");
            $('#success &gt; .alert-danger').html("&lt;button type='button' class='close' data-dismiss='alert' aria-hidden='true'&gt;&amp;times;")
              .append("&lt;/button&gt;");
            $('#success &gt; .alert-danger').append($("&lt;strong&gt;").text("Sorry " + firstName + ", it seems that my mail server is not responding. Please try again later!"));
            $('#success &gt; .alert-danger').append('&lt;/div&gt;')
            $('#contactForm').trigger("reset");
          },
          complete: function() {
            setTimeout(function() {
              $this.prop("disabled", false); 
            }, 1000);
          }
        });
      },
      filter: function() {
        return $(this).is(":visible");
      },
    });
  
    $("a[data-toggle=\"tab\"]").click(function(e) {
      e.preventDefault();
      $(this).tab("show");
    });
  });
  
  /*When clicking on Full hide fail/success boxes */
  $('#name').focus(function() {
    $('#success').html('');
  });
  </code></pre>
  
  <p>The PHP-file associated with it(I marked out my email):</p>
  
  <pre><code>    &lt;?php
  if(empty($_POST['name'])      ||
     empty($_POST['email'])     ||
     empty($_POST['phone'])     ||
     empty($_POST['message'])   ||
     !filter_var($_POST['email'],FILTER_VALIDATE_EMAIL))
     {
     echo "No arguments Provided!";
     return false;
     }
  
  $name = strip_tags(htmlspecialchars($_POST['name']));
  $email_address = strip_tags(htmlspecialchars($_POST['email']));
  $phone = strip_tags(htmlspecialchars($_POST['phone']));
  $message = strip_tags(htmlspecialchars($_POST['message']));
  
  
  $to = '*****@******.com'; 
  $email_subject = "Website Contact Form:  $name";
  $email_body = "You have received a new message from your website contact form.\n\n"."Here are the details:\n\nName: $name\n\nEmail: $email_address\n\nPhone: $phone\n\nMessage:\n$message";
  $headers = "From: noreply@********.com\n"; 
  $headers .= "Reply-To: $email_address";   
  mail($to,$email_subject,$email_body,$headers);
  return true;         
  ?&gt;
  </code></pre>
  
  <p>And the HTML-snippet:</p>
  
  <pre><code>      &lt;!-- Contact --&gt;
    &lt;section id="contact"&gt;
      &lt;div class="container"&gt;
        &lt;div class="row"&gt;
          &lt;div class="col-lg-12 text-center"&gt;
            &lt;h2 class="section-heading text-uppercase"&gt;Feel free to contact me!&lt;/h2&gt;
            &lt;h3 class="section-subheading text-muted"&gt;How can I help you?&lt;/h3&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class="row"&gt;
          &lt;div class="col-lg-12"&gt;
            &lt;form id="contactForm" name="sentMessage" novalidate="novalidate"&gt;
              &lt;div class="row"&gt;
                &lt;div class="col-md-6"&gt;
                  &lt;div class="form-group"&gt;
                    &lt;input class="form-control" id="name" type="text" placeholder="Your Name *" required="required" data-validation-required-message="Please enter your name."&gt;
                    &lt;p class="help-block text-danger"&gt;&lt;/p&gt;
                  &lt;/div&gt;
                  &lt;div class="form-group"&gt;
                    &lt;input class="form-control" id="email" type="email" placeholder="Your Email *" required="required" data-validation-required-message="Please enter your email address."&gt;
                    &lt;p class="help-block text-danger"&gt;&lt;/p&gt;
                  &lt;/div&gt;
                  &lt;div class="form-group"&gt;
                    &lt;input class="form-control" id="phone" type="tel" placeholder="Your Phone *" required="required" data-validation-required-message="Please enter your phone number."&gt;
                    &lt;p class="help-block text-danger"&gt;&lt;/p&gt;
                  &lt;/div&gt;
                &lt;/div&gt;
                &lt;div class="col-md-6"&gt;
                  &lt;div class="form-group"&gt;
                    &lt;textarea class="form-control" id="message" placeholder="Your Message *" required="required" data-validation-required-message="Please enter a message."&gt;&lt;/textarea&gt;
                    &lt;p class="help-block text-danger"&gt;&lt;/p&gt;
                  &lt;/div&gt;
                &lt;/div&gt;
                &lt;div class="clearfix"&gt;&lt;/div&gt;
                &lt;div class="col-lg-12 text-center"&gt;
                  &lt;div id="success"&gt;&lt;/div&gt;
                    &lt;button id="sendMessageButton" class="btn btn-primary btn-xl text-uppercase" type="submit"&gt;Send Message&lt;/button&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/form&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/section&gt;
  </code></pre>