jquery - Uploading multiple images with AJAX empty php response -


i'm trying upload multiple images via post ajax method, if upload more 2 pictures, empty array response php, 1 or 2, , 3 images, successful response! data passed php times, response mystery !

my ajax

var id=data;                          var file_data=$('#images').prop('files');                                  var formdata = new formdata();                          for(var x in file_data){                             formdata.append("image["+x+"]", file_data[x]);                          }                          formdata.append("id", id);                          $.ajax({                             url: "ajax/ajax_add_car.php?veids=2",                             enctype: "multipart/form-data",                             method: "post",                             data: formdata,                             cache:false,                             processdata: false,                             contenttype: false,                             success: function(data){                                 console.log(data);                             },                           }) 

mine php response:

foreach($_files $lolz){ print_r($lolz); 

} print_r($_post);


Comments

Popular posts from this blog

python - TypeError: start must be a integer -

c# - DevExpress RepositoryItemComboBox BackColor property ignored -

django - Creating multiple model instances in DRF3 -