title: jQuery ajax() POST to Slim PHP framework
body: <p>Using jquery mobile+phonegap, trying to POST to a Slim application, I have this code:</p>
  
  <pre><code>$( document ).on( "vclick", "#test_form", function() {
              $.ajax({
                  type: "POST",
                  url: "http://mydomain.com/slim/",
                  crossDomain: true,
                  beforeSend: function() {
                      $.mobile.loading('show')
                  },
                  complete: function() {
                      $.mobile.loading('hide')
                  },
                  data: {namec:$("#namec").val()},
                  dataType: 'json',
                  success: function(response) {
                      //console.error(JSON.stringify(response));
                      alert(response);
                  },
                  error: function() {
                      //console.error("error");
                      alert('Not working!');
                  }
              });
  });
  </code></pre>
  
  <p>I have tested this with other non Slim PHP pages and everything works fine, I get the ajax error with Slim though.</p>
  
  <p>My Slim app:</p>
  
  <pre><code>&lt;?php
  require 'Slim/Slim.php';
  
  \Slim\Slim::registerAutoloader();
  
  $app = new \Slim\Slim();
  
  $app-&gt;post('/', function () {
      echo json_encode($_POST("namec"));
  });
  
  $app-&gt;run();
  </code></pre>
  
  <p>Just started using Slim, so not sure what I could be doing wrong.</p>