-1
Dear I need to send more than one variable via ajax/php, I performed some tests without success, how should I proceed?
PHP (this works but I can’t insert another variable)
$("#colPasta").focus(function(){
var val = new Array();
$('.check:checked').each(function(){
val.push($(this).val());
});
$.ajax({
url:'colPasta.php',
type:'GET',
data:'col=<?php print $colar; ?>',
success:function(data){
$('.exibeColPasta').html(data);
}
});
return false;
});
I have tried using the following PHP command without success.
data:{ 'col'= <?php echo $colar; ?>, 'ovo'= <?php echo $ovo; ?>},
I stand by.
I was able to apply more than one variable for sending, but still unsuccessful for arrays data:{col:'<? php print $paste; ? >',mov:'<? php print $colar2; ?>'},
– Bruno Depieri Barduchi