Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7974705
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T08:27:09+00:00 2026-06-04T08:27:09+00:00

I have this jQuery script that sends a username an password to a PHP

  • 0

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…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T08:27:10+00:00Added an answer on June 4, 2026 at 8:27 am

    It appears that IE doesn’t send a correct conent-type in cross-domain requests. The content-type is always set to “text/plain”.

    Read more about this shortcoming in this blogpost: http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx

    We fixed this on the server by parsing the php://input string and setting this as $_POST vars.

    if ($_SERVER['REQUEST_METHOD'] == 'POST' && count($_POST) == 0) {
        $postData = file_get_contents('php://input');
        $postVars = explode('&', $postData);
        foreach ($postVars as $postVar) {
            list($key, $var) = explode('=', $postVar);
            $_POST[$key] = $var;
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this jquery script which suppose to hide/show div element base on the
I have this jQuery script var dataString = class_id=+class_id; $.ajax({ type: POST, url: page.php,
I need to send newsletters. I have already a PHP script that sends mass
I have a PHP script that produces a .CSV export file from a MySQL
I have jQuery Ajax request that sends data to a PHP page that then
I have an jquery ajax request that calls a PHP script that will send
I have some script that takes a form and sends it to php using
I have this jquery script that refreshes a div tag on my page: $(function()
I have this at the top of my jQuery script: $().ajaxStart(function() { alert('ok'); });
I have this simple function: <script type=text/javascript> //<![CDATA[ jQuery(function($){ function here(b){alert(b);} ; here(6); });

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.