title: Post array of multiple checkbox values
body: <p>Why is only one value of the "db" checkbox values array being sent to the server side script?</p>
  
  <p><strong>JQUERY:</strong></p>
  
  <pre><code>$(".db").live("change", function() {
      $(this).add($(this).next("label")).add($(this).next().next("br")).remove().insertAfter(".db:last + label + br"); 
      var url = "myurl.php";
      var db = [];
      $.each($('.db:checked'), function() {
          db.push($(this).val()); 
      });
      if(db.length == 0) { 
          db = "none"; 
      }       
      $.post(url, {db: db}, function(response) {
          $("#dbdisplay").html(response); 
      });
      return true;
  });
  </code></pre>
  
  <p><strong>HTML:</strong></p>
  
  <pre><code>&lt;input type="checkbox" name="db[]" class="db" value="track"/&gt;&lt;label for="track"&gt;track&lt;/label&gt;&lt;/br&gt;
  &lt;input type="checkbox" name="db[]" class="db" value="gps"/&gt;&lt;label for="gps"&gt;gps&lt;/label&gt;&lt;/br&gt;
  &lt;input type="checkbox" name="db[]" class="db" value="accounting"/&gt;&lt;label for="accounting"&gt;accounting&lt;/label&gt;&lt;/br&gt;
  </code></pre>
  
  <p><strong>Edit</strong>:  I ended up answering my own question, but does anyone have documentation (or an explanation) of why this is necessary?  It was difficult for me to find the exact answer (thus the posthumous post). </p>