title: pass values of checkbox in ajax
body: <p>my javascript and php is very low at the moment and i am trying to make something really simple but just can do it!</p>
  
  <p>i have a form and i want the checbox values(the ones who are marked ofcourse) to be passed on to the file they need to get to(its all good and passed on except the checkboxes) and from there to the email(that works too except the checkboxes).</p>
  
  <p>here is my code:</p>
  
  <p>(again - everything works but the checkboxes and i removed small things like validation of other things so it will be comfterble to read)</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      jQuery(function () {
  
          jQuery(".button").click(function () {
              // validate and process form
              // first hide any error messages
              jQuery('.error').hide();
  
              var name = jQuery("input#name").val();
  
              var email = jQuery("input#email").val();
  
              var phone = jQuery("input#phone").val();
  
  
              var dataString = 'name=' + name + '&amp;email=' + email + '&amp;phone=' + phone;
              //alert (dataString);return false;
  
              jQuery.ajax({
                  type: "POST",
                  url: "mitkadmim.php",
                  data: dataString,
                  success: function () {
                      jQuery('#contact_form').html("&lt;div id='message'&gt;&lt;/div&gt;");
                      jQuery('#message').html("&lt;h2&gt;Contact Form Submitted!&lt;/h2&gt;")
                          .append("&lt;p&gt;We will be in touch soon.&lt;/p&gt;")
                          .hide()
                          .fadeIn(1500, function () {
                          jQuery('#message').append("&lt;img id='checkmark' src='images/check.png' /&gt;");
                      });
                  }
              });
              return false;
          });
      });
  &lt;/script&gt;
  
  
      &lt;div id="mheo"&gt;
  
          &lt;div id="contact_form"&gt;
            &lt;form name="contact" method="post" action=""&gt;
              &lt;fieldset&gt;
                &lt;label for="name" id="name_label"&gt;שם: &lt;/label&gt;
                &lt;input type="text" name="name" id="name" size="30" value="" class="text-input" /&gt;&lt;br/&gt;&lt;br/&gt;
  
                &lt;label for="email" id="email_label"&gt;E-mail: &lt;/label&gt;
                &lt;input type="text" name="email" id="email" size="30" value="" class="text-input" /&gt;&lt;br/&gt;&lt;br/&gt;
  
  
                &lt;label for="phone" id="phone_label"&gt;מס. טלפון&lt;/label&gt;
                &lt;input type="text" name="phone" id="phone" size="30" value="" class="text-input" /&gt;&lt;br/&gt;&lt;br/&gt;
  
          intrested in:&lt;br/&gt;
                  &lt;input type="checkbox" name="kidumchoise[]" value="kidum_esek" /&gt;aaa&lt;br /&gt;
                  &lt;input type="checkbox" name="kidumchoise[]" value="mitug_esek" /&gt;bbb&lt;br /&gt;
                  &lt;input type="checkbox" name="kidumchoise[]" value="laikim" /&gt;CCC&lt;br /&gt;
                  &lt;input type="checkbox" name="kidumchoise[]" value="aher" /&gt;DDD&lt;br /&gt;
  
  
                  &lt;br /&gt;
                &lt;input type="submit" name="submit" class="button" id="submit_btn" value="Send" /&gt;
              &lt;/fieldset&gt;
            &lt;/form&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>and the email side</p>
  
  <pre><code>&lt;?php
     $recipient = 'ddsds@gmail.com';
     $name = $_POST['name'];
     $email = $_POST['email'];
     $phone = $_POST['phone'];
     $kidumchoise = $_POST['kidumchoise'];   
  
     $msg = "Message from: $name\n\n".$_POST['phone']."\n".$_POST['email'].$_POST['kidumchoise']."    \n""\n".$_POST['kidumchoise']."\n";
     mail($recipient, $name , $msg);
  ?&gt;
  </code></pre>
  
  <p>what do i do wrong?
  thanks, </p>