How to pass multiple checkboxes to PHP through JQUERY
<p>I HAVE modified my code, i used firebug console.log to detect weather the the php  gets the array passed or not. and firebug displays this - rescheck[]=2&amp;rescheck=1&amp;rescheck=3</p>

<p>I think php gets the array if THATS what an array in php supposed to be like.</p>

<p>SO guys, if thats correct how to insert that array in database? or how to loop it? the foreach loop ive made didnt work.</p>

<p>JQUERY CODE:</p>

<pre><code>$('#res-button').click(function (){

var room_id=$('[name=rescheck[]]:checked').serialize().replace(/%5B%5D/g,'[]');

    alert(room_id);


  $.ajax({
                    type: "POST",
                    url: "reservation-valid.php",
                    data: {name_r:name_r, email_r:email_r,contact_r:contact_r,prop_id:p_id,cvalue:room_id},
                    success: function(data) {

                    console.log(data);
}

});
});

&lt;input type="checkbox" name="rescheck[]" value="&lt;?php echo $roomid; ?&gt;"  /&gt;
</code></pre>

<p>PHP CODE:</p>

<pre><code>$c_array=$_POST['cvalue'];

    echo $c_array;

    //foreach($c_array as $ch)
    //{
    //$sql=mysql_query("INSERT INTO reservation VALUES('','$prop_id','$ch','$name_r','$contact_r','$email_r','')");
    //}
</code></pre>

<p>I think I managed my jquery code to be right, but I don't know how to fetch that with PHP. </p>
