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
Post a Comment