jquery - send formData and other object from ajax to php -


i have ajax query send form "have upload file input" php file,

to send file formdata :

var formdata = new formdata(); var file = $("#logo").get(0).files[0]; formdata.append("logo", file); 

and have other input values wanna send name , password,email ... , here object created :

{name:name, email:email, password:password, auth:auth} 

so i'm asking how send formdata + object data in ajax here :

$.ajax({     data :  ...... ? }); 

you have append each element within serialized form data formdata object.

refer here: send formdata , string data through jquery ajax?


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -