$ _POST数组为空

I am working with XAMPP and PHPStorm v9, running locally, a simple application that does an AJAX callback.

My server handler for the AJAX request is showing an empty $_POST array and I have no idea why. Before I take all of this code and run on a different server, to eliminate the platform as the issue, does anyone see why the $_POST array would be empty? Any suggestions? Thanks

The XHR pane, shows the post executed. enter image description here

The JS

if (valid) {

    var queryStr = 'fName=' + firstName.val() + '&lName=' + lastName.val() + '&email=' + email.val() + '&phone=' + phone.val();

    var f = firstName.val();
    var l = lastName.val();
    var e = email.val();
    var p = phone.val();

    $.ajax({
        type: "POST",
        url: '/ACS567-Projects/addContact.php',
        data: {
            fName: f,
            lName: l,
            email: e,
            phone: p
        },
        dataType: 'html',
        success: OnAddSuccess,
        error: OnAddFailure,
        timeout: 60000
    });
}

The PHP handler

<?php

if(isset($_POST['fName'])) {

    $firstName = $_POST['fName'];
    $lastName = $_POST['lName'];
    $email = $_POST['email'];
    $phone = $_POST['phone'];
    $addressBook->addContact($firstName,$lastName,$email,$phone);

    echo "<b>success</b>";
    exit();
}

echo "<b>failure</b>";
exit();

Data will not automatically turn into an array ready for use in your PHP script. Read the jQuery documentation:

It is converted to a query string, if not already a string. It's appended to the url for GET-requests. See processData option to prevent this automatic processing. Object must be Key/Value pairs. If value is an Array, jQuery serializes multiple values with same key based on the value of the traditional setting (described below).

Also, you should use 'method' instead of 'type' if you don't have an old jQuery version.

More info on the .ajax function found here:

http://api.jquery.com/jquery.ajax/

Have you inspected your client/browser to see what is posted and dumped the $_POST variable to see that it's really empty?