title: ajax post multi checkbox
body: <p>I am having problems posting this multi checkbox data with ajax.</p>
  
  <pre><code>&lt;?php
  foreach($_SESSION['contacts'] as $user =&gt; $id) {?&gt;
  &lt;li class="contactList"&gt;&lt;span&gt;&lt;input type="checkbox" name="contact[]" id="contact" value="&lt;?php echo $id; ?&gt;" /&gt;&lt;/span&gt;&lt;?php echo $user; ?&gt;&lt;/li&gt;
  &lt;?php } ?&gt;
  </code></pre>
  
  <p>then the ajax</p>
  
  <pre><code>        var contact = $("#contact").val()
      var days = $("#days").val()
      $.ajax({
          type: 'post',
          url: 'temp_history.php',
          data: {contact: contact, days: days},
          context: document.body,
  </code></pre>
  
  <p>It is not posting the array of contacts as the form would submit normally but is submitting a single contact.</p>
  
  <p>Any ideas?</p>