jQuery Ajax form only sends last of several checkbox values
<p>I'm trying to submit a form with jQuery's $.ajax() function and it works, aside from the fact that it only sends the value of the last of several checkboxes, regardless of how many I check. I'd appreciate if someone could tell me what I'm doing wrong. Thanks in advance!</p>

<p>The HTML form:</p>

<pre><code>&lt;form name="contactFormSmall" id="contactFormSmall" action="" method="post"&gt;
    &lt;input type="text" name="textfieldname" value="textfieldvalue" /&gt;
    &lt;input type="checkbox" name="checkboxes" value="Testvalue One" checked="checked" /&gt;
    &lt;input type="checkbox" name="checkboxes" value="Testvalue Two" checked="checked" /&gt;
    &lt;input type="checkbox" name="checkboxes" value="Testvalue Three" checked="checked" /&gt;
&lt;/form&gt;
</code></pre>

<p>Here's the jQuery handling the form:</p>

<pre><code>var fields = $(":input").serializeArray();

$.ajax({
    type: "POST",
    contentType: "application/x-www-form-urlencoded;charset=ISO-8859-15",
    url: "includes/contact_process_small.php",
    data: fields,
    success: function(data) {
        $('#contactFormSmall').hide();
        $("#formFeedback").html(data).show();
    }

});
</code></pre>

<p>And here's the result from print_r($_POST) in the php script:</p>

<pre><code>Array
(
    [textfieldname] =&gt; textfieldvalue
    [checkboxes] =&gt; Testvalue Three
)
</code></pre>
