title: Stay on page after submitting form
body: <p>I'm trying to stay on the current page from where a form gets submitted. But somehow it's not working. I found some peaces of code on the internet and put it together.</p>
  
  <p>This is the process.php file:</p>
  
  <pre><code>&lt;?php
  // Get Data    
  $name = strip_tags($_POST['name']);
  $email = strip_tags($_POST['email']);
  $phone = strip_tags($_POST['phone']);
  $subject = strip_tags($_POST['subject']);
  $message = strip_tags($_POST['message']);
  
  // Send Message
  mail( "email@domain.com", "Contact Form testttt",
  "Name: $name\nEmail: $email\nPhone: $phone\nWebsite: $url\nMessage: $message\n",
  "From: Forms testtttttttt" );
  ?&gt;
  </code></pre>
  
  <p>And the rest of the code, the html and javascripts can be found on jsfiddle:
  <a href="http://jsfiddle.net/4zYTD/1/" rel="nofollow">jsfiddled code</a></p>
  
  <pre><code>    $(function(){
          $('#contact').validate({
          submitHandler: function(form) {
                  $(form).ajaxSubmit({
                  url: 'process.php',
                  success: function() {
                      $('#contact').hide();
                      $('#contact-form').append("&lt;p class='thanks'&gt;thanks test.&lt;/p&gt;")
                      }
                  });
              }
          });         
      });
  </code></pre>
  
  <p>Forgot to mention what happens now. I get redirected to process.php page.</p>