var data = $('#demoform').serialize();
var action = $('#demoform').attr('data-action');
console.log(data)
$.ajax({
type: 'POST',
url: '../include/demo.php',
dataType: "json",
data: {
data: data,
action: action
},
success: function(data) {
}
}).done(function(data) {
});
In my php I get the data and I check it if the data is array like
$data = $_POST['data'];
if (is_array($data)) {
}else{
}
I cant send it and when I use print_r();
I can get
task_date=11%2F30%2F2017+8%3A14+PM&task=qwe&task_person=qwe&task_status=0
But I always end up in the else part meaning the data is not an array.
What is the format of the data if not array?