title: serializing checkboxes in jQuery
body: <p>I have a jQuery form in which I create a series of checkboxes:</p>
  
  <pre><code>&lt;?php
  &lt;form method="post" id="b-form" action="../createb.php"&gt;
      for ($i=0; $i&lt;$request_count; $i++){
         &lt;div class="request-check"&gt;
            &lt;table&gt;
               &lt;tr&gt;
                  &lt;td&gt;&lt;input type="checkbox" name="show_request[]" value="request".$i."      checked="checked"/&gt;select request&lt;/td&gt;
               &lt;/tr&gt;
            &lt;/table&gt;
          &lt;/div&gt;
     }
  </code></pre>
  
  <p>javascript</p>
  
  <pre><code>$.ajax({
            type: 'POST',
            url: '../createb.php',
            data: $('#b-form').serialize(),
            success: function (msg){
                  alert(msg);
            }
  })
  </code></pre>
  
  <p>at the moment createb.php is just testing the form</p>
  
  <pre><code>  $requests = $_POST['show_request'];
    $request_count = count($requests);
    echo 'count: '.$request_count;
    echo $requests[0];
  </code></pre>
  
  <p>The Problem is that the serialize function only sees the first checkbox and indicates whether it has been checked or not.  It does not see any of the other check boxes. Does anybody have an idea why the other check boxes do not get serialized and what to do about it?</p>
  
  <p>Thanks
  David</p>