How to fetch serialized jquery array to a php page?
<p>heres my code ive serialized checboxes and i want it to be pass to a php page through ajax. NOTE that i am not using forms. and i cant use forms. i am using click event on a button to pass the value.</p>

<pre><code>$('#res-button').click(function (){
    var pid = $('#pid');
    var name_res= $('#name_res');
    var email_res= $('#email_res');
    var contact_res= $('#contact_res');
    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) {
                    //some codes here
                    });

                    }
                }); 
});
</code></pre>

<p>THE RESULT OF MY ALERT TO room_id is this- "rescheck[]=1&amp;rescheck[]=2&amp;....." so i know my serialize is working, but i cant get it to php to insert my ids in database.</p>

<p>this is my php code:</p>

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

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