Ho aggiunto la chiamata ajax cosi
Codice PHP:
jQuery('.select').live('click',function() {
var box = new Array();
jQuery(".mycheck").each(function() {
var checked_status = jQuery('.mycheck').is(':checked');
if(checked_status==true)
{ box.push(jQuery(this).val()); alert(box); } });
$.ajax({
type: 'POST',
url: 'file.php',
data: 'select='+box,
success: function(response){
jQuery('.body').after(response);
}
})
});
Il file php è cosi
Codice PHP:
if(isset($_POST['select']))
{
$file = explode(',', $_POST['select']);
$select =$file[1];
}
echo $select;
Non mi stampa nulla a video.
Dove sbaglio?