POST requests default to GET requests
I am trying to send a simple POST request to a PHP script but the request keeps showing up as a GET request instead. Here's my jQuery code:
-
$.ajax({
type: "POST",
url: strURL,
data: "name=John&location=Boston",
success: function(msg){
$("#dealerResults").html(msg);
}
});
When I echo $_SERVER['REQUEST_TYPE'] on the PHP side it is returning "GET" every single time. I tried using $.post and $.ajax in jQuery. Any ideas why this isn't working?!? jQuery is failing me right now.
