I have this jQuery script that sends a username an password to a PHP file which checks if this user exists and returns a JSON user object. Works fine in non-IE browsers, but IE fails.
The wierd thing is that the IE "firebug" says everything is fine, but the PHP script doesnt recieve any vars...
This is the request body:
username=johanderowan&password=1234
These are the request headers (I left out a few vars for security reasons):
Request = POST /1.0/account/login.json HTTP/1.1
Accept = /
Origin = [DEVURL]
Accept-Language = nl-NL
UA-CPU = AMD64
Accept-Encoding = gzip, deflate
User-Agent = Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0)
Host = [DEVURL]
Content-Length = 66
Connection Keep-Alive Cache-Control no-cache
The response body is (first three empty arrays are $_GET, $_POST and $_REQUEST):
Array ( )
Array ( )
Array ( )
{"status":"error","message":"No username or password specified.","httpCode":500}
This is the request script:
$('.mobyNowLoginForm form').bind('submit', function(){
var username = $(this).find('.username').val();
var password = $(this).find('.password').val();
$.post('[url]/1.0/account/login.json', {
username: username,
password: password
}, function(response) {
// do something
}, "JSON");
return false;
});
I have no clue at all what could be wrong here...