title: How to run PHP script in the back by a jquery button
body: <p>I need to run some PHP code from a file when I click a button from jQuery. This is the code I have:</p>
  
  <pre><code>$(document).ready(function(){
  
        $("#btnSubmit").button().click(function(){
          alert("button 1");
  
          $.ajax({
          url: 'releaseBackEnd.php',
          type: 'POST',
          async: false,
          data: {},
          dataType: 'xml',
          error: function(){
              alert('Error');
          },
          success: function(data){        
              //check error
              alert("success!");
  
          }
      });
  
      });
   });
  </code></pre>
  
  <p>It shows the alert of "error". I have the releaseBackEnd.php file in the same directory of the javascript file.</p>