I want to submit a POST form that contains a textarea field and an input field(s) (type=\"checkbox\" with an arbitrary/variable number of checkboxes) on my website via jQuer
Yes it's pretty work with jquery.serialize()
HTML
JQuery
function submitForm() {
var form = document.myform;
var dataString = $(form).serialize();
$.ajax({
type:'POST',
url:'myurl.php',
data: dataString,
success: function(data){
$('#myResponse').html(data);
}
});
return false;
}
NOW THE PHP, i export the POST data
echo var_export($_POST);
You can see the all the checkbox value are sent.I hope it may help you