title: Submit button does nothing
body: <p>I have a submit button in a form and use PHP for scripting to email the form. When the button is pressed nothing happens, not even showing the PHP code like when PHP isn't installed. I have tested other simple mailing forms on machine and they show the code. This one does nothing.</p>
  
  <p>HTML Code:</p>
  
  <pre><code>&lt;form name="apply" method="post" action="mail.php"&gt;                 
  &lt;font class="error-message"&gt;&lt;/font&gt;
      &lt;div class="form-content"&gt;
          &lt;div class="left-label"&gt;
              &lt;label&gt;First and Last name:&lt;/label&gt;
              &lt;label&gt;School type:&lt;/label&gt;
              &lt;label&gt;Practice name:&lt;/label&gt;
              &lt;label class="address"&gt;Address:&lt;/label&gt;
      &lt;label class="address2"&gt;Address (cont):&lt;/label&gt;
      &lt;label class="zip"&gt;Zip Code:&lt;/label&gt;
      &lt;label class="city"&gt;City:&lt;/label&gt;
              &lt;label&gt;Website:&lt;/label&gt;
              &lt;label&gt;Email:&lt;/label&gt;
          &lt;/div&gt;
          &lt;div class="right-fields"&gt;                          
              &lt;input type="text" name="fist-last-name" placeholder="First &amp; Last name" title="Please enter First &amp; Last name." /&gt;
              &lt;select name="select-school"&gt;
                  &lt;option&gt;--select--&lt;/option&gt;
                  &lt;option&gt;Dental Assistant School&lt;/option&gt;
                  &lt;option&gt;Medical Assistant School&lt;/option&gt;
                  &lt;option&gt;Pharmacy Technician School&lt;/option&gt;
                  &lt;!-- &lt;option&gt;Personal Trainer School&lt;/option&gt; --&gt;
                  &lt;option&gt;Other School&lt;/option&gt;
              &lt;/select&gt;
              &lt;input type="text" name="practice-name" placeholder="Practice name" title="Please enter your practice name." /&gt;
              &lt;textarea name="address1" placeholder="Address 1" title="Please enter address1"&gt;&lt;/textarea&gt;
              &lt;textarea name="address2" placeholder="Address 2" title="Please enter address2"&gt;&lt;/textarea&gt;
              &lt;div class="clear"&gt;&lt;/div&gt;
              &lt;input type="text" name="zipcode" placeholder="Zip Code" title="Please enter your zipcode." /&gt;&lt;br&gt;
              &lt;input type="text" name="city" placeholder="City" title="Please enter the city where you live." /&gt;
              &lt;input type="text" name="website-address" placeholder="Website" title="Please enter your website address." /&gt;
              &lt;input type="text" name="email" placeholder="Email" title="Please enter your email address." /&gt;
              &lt;input type="submit" value="Submit"/&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="clear"&gt;&lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>PHP code, <code>mail.php</code>:</p>
  
  <pre><code>&lt;?php
  
  $fist_last_name     = $_POST["fist-last-name"];
  
  $school_type        = $_POST["select-school"];
  
  $practice_name      = $_POST["practice-name"];
  
  $address1           = $_POST["address1"];
  
  $address2           = $_POST["address2"];
  
  $zipcode            = $_POST["zipcode"];
  
  $city               = $_POST["city"];
  
  $website            = $_POST["website-address"];
  
  $email              = $_POST["email"];
  
  
  $body   = " &lt;table&gt;
  
                  &lt;tr&gt;&lt;th&gt;First Last name:&lt;/th&gt;&lt;td&gt;".$fist_last_name."&lt;/td&gt;&lt;/tr&gt;
  
                  &lt;tr&gt;&lt;th&gt;School type:&lt;/th&gt;&lt;td&gt;".$school_type."&lt;/td&gt;&lt;/tr&gt;
  
                  &lt;tr&gt;&lt;th&gt;Practice name:&lt;/th&gt;&lt;td&gt;".$practice_name."&lt;/td&gt;&lt;/tr&gt;
  
                  &lt;tr&gt;&lt;th&gt;address1:&lt;/th&gt;&lt;td&gt;".$address1."&lt;/td&gt;&lt;/tr&gt;
  
                  &lt;tr&gt;&lt;th&gt;address2:&lt;/th&gt;&lt;td&gt;".$address2."&lt;/td&gt;&lt;/tr&gt;
  
                  &lt;tr&gt;&lt;th&gt;Zipcode:&lt;/th&gt;&lt;td&gt;".$zipcode."&lt;/td&gt;&lt;/tr&gt;
  
                  &lt;tr&gt;&lt;th&gt;City:&lt;/th&gt;&lt;td&gt;".$city."&lt;/td&gt;&lt;/tr&gt;
  
                  &lt;tr&gt;&lt;th&gt;Website:&lt;/th&gt;&lt;td&gt;".$website."&lt;/td&gt;&lt;/tr&gt;
  
                  &lt;tr&gt;&lt;th&gt;Email:&lt;/th&gt;&lt;td&gt;".$email."&lt;/td&gt;&lt;/tr&gt;
  
              &lt;/table&gt;";
  
  mail('emailaddress@domain.com','No Reply',$body,"From: noreply@domain.com");
  
  ?&gt;
  </code></pre>
  
  <p>This is the JavaScript for the form validation:</p>
  
  <pre><code>/* Form validation */
  
  $("form[name='apply']").submit(function(){
      var error = true;
      var text_fields = ["fist-last-name", "practice-name", "zipcode", "city", "website-address", "email"];
      $.each(text_fields,function(key,value){
          if(!$.trim($("input[name='"+value+"']").val()) == "") {
              $("input[name='"+value+"']").css({'border-color': '#ccc'});
          }
          else{
              $("input[name='"+value+"']").css({'border-color': 'red'});
              error = false;
          }
      });
      if($("form[name='apply'] select[name='select-school']").val() == "--select--") {
          $("form[name='apply'] select[name='select-school']").css({'border-color': 'red'});
          error = false;
      }
      else {
          $("form[name='apply'] select[name='select-school']").css({'border-color': '#ccc'});
      }
      var textarea_fields = ["address1", "address2"];
      $.each(textarea_fields,function(key,value){
          if(!$.trim($("form[name='apply'] textarea[name='"+value+"']").val()) == "" ) {
              $("form[name='apply'] textarea[name='"+value+"']").css({'border-color': '#ccc'});
          }
          else {
              $("form[name='apply'] textarea[name='"+value+"']").css({'border-color': 'red'});
              error = false;
          }
      });
      console.log(error);
      if(error == true) {
          $.post('mail.php',$("form[name='apply']").serialize(),function(data){
              console.log(data);
          });
      }
      return false;
  });
  
  $("form[name='apply'] input[type='text'], form[name='apply'] textarea").blur(function(){
      if($.trim($(this).val()) == ""){
          $(".error-message").text($(this).attr('title'));
          $(this).css({'border-color': 'red'});
      }
      else {
          $(this).css({'border-color': '#ccc'});
          $(".error-message").text('');
      }
  });
  $("form[name='apply'] input[type='text'], form[name='apply'] textarea").bind("keydown",function(){
      if($.trim($(this).val()) == ""){
          $(".error-message").text($(this).attr('title'));
          $(this).css({'border-color': 'red'});
      }
      else {
          $(this).css({'border-color': '#ccc'});
      }
  });
  </code></pre>
  
  <p>The error occurs in this code:</p>
  
  <pre><code>$("form[name='apply']").submit(function(){
      var error = true;
      var text_fields = ["fist-last-name", "practice-name", "zipcode", "city", "website-address", "email"];
      $.each(text_fields,function(key,value){
          if(!$.trim($("input[name='"+value+"']").val()) == "") {
              $("input[name='"+value+"']").css({'border-color': '#ccc'});
          }
          else{
              $("input[name='"+value+"']").css({'border-color': 'red'});
              error = false;
          }
      });
      if($("form[name='apply'] select[name='select-school']").val() == "--select--") {
          $("form[name='apply'] select[name='select-school']").css({'border-color': 'red'});
          error = false;
      }
      else {
          $("form[name='apply'] select[name='select-school']").css({'border-color': '#ccc'});
      }
      var textarea_fields = ["address1", "address2"];
      $.each(textarea_fields,function(key,value){
          if(!$.trim($("form[name='apply'] textarea[name='"+value+"']").val()) == "" ) {
              $("form[name='apply'] textarea[name='"+value+"']").css({'border-color': '#ccc'});
          }
          else {
              $("form[name='apply'] textarea[name='"+value+"']").css({'border-color': 'red'});
              error = false;
          }
      });
      console.log(error);
      if(error == true) {
          $.post('mail.php',$("form[name='apply']").serialize(),function(data){
              console.log(data);
          });
      }
      return false;
  }); 
  </code></pre>