title: Why does my submit form take me to my php page?
body: <p>(I didn't realize that the post I had already made before this could be edited and reopened. Confused about the process...)</p>
  
  <p>When I click to send the form, the email is sent correctly but then I get sent to my php page showing the number 0. I don't get why this is happening. Here's the (mostly)full code:</p>
  
  <pre><code>&lt;form id="contactForm" method="post" action="js/formCheck.php"&gt;
      &lt;div class="formCol"&gt;
          &lt;label&gt;Email:&lt;/label&gt;
          &lt;input type="email" id="formEmail" name="email" autocomplete="off" placeholder="Your email address..." required/&gt;
      &lt;/div&gt;
      &lt;div class="formCol midCol"&gt;
          &lt;label id="floatMsg"&gt;Message (350 chars):&lt;/label&gt;
          &lt;textarea id="formMessage" name="message" rows="5" cols="40" maxlength="350" placeholder="What have you got to say?" required&gt;&lt;/textarea&gt;
  
      &lt;/div&gt;
      &lt;div class="formCol lastCol"&gt;
          &lt;input type="submit" class="submit-btn" name="submit" value="Send" /&gt;
      &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>... scripts</p>
  
  <pre><code>&lt;script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;!--[if lt IE 9]&gt;&lt;script src="js/modernizr.custom.js"&gt;&lt;/script&gt;&lt;![endif]--&gt;
  &lt;script src="js/jquery.flexslider-min.js"&gt;&lt;/script&gt;
  &lt;script src="js/functions.js"&gt;&lt;/script&gt;
  &lt;script&gt;
      $(document).ready(function() {
          $('#form').ajaxForm(function() {
              alert("Thank you for your comment! I will receive it shortly and get back to you as soon as possible.");
              document.getElementById("form").reset();
          });
  
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>SEND EMAIL (PHP)</p>
  
  <pre><code>if (isset($_POST['submit'])) {
      $email = htmlspecialchars($_POST['email']);
      $comment = htmlspecialchars($_POST['message']);
  
  
  
      /* Sending Email */
      $from_add = "Visitor";
      $to_add = "user@email.com";
      $subject = "The_Message_Subject";
      $message = "
          Message Information
          Email = $email
          Message = $comment";
  
      $headers = "From: $from_add \r\n";
      $headers .= "Reply-To: $from_add \r\n";
      $headers .= "Return-Path: $from_add \r\n";
      $headers .= "X-Mailer: PHP \r\n";
  
      mail($to_add, $subject, $message, $headers);
  }
  </code></pre>