Good afternoon friends, I'm making a website that the person does the registration in my form and I, using AJAX, play the data in the bank. I wanted to know how to save this image that the person put in the form in some variable, so that my upload function can use it as soon as it is registered. For example:
function saveCliente(){
$.post("../setters/addLojaPainel.php", $('#form').serialize(), function (response) {
if (response.result == "1") {
doUpload(response.id);
getData();
}else{
alert(response.exception);
}
});
}
that is, when the result of the request is 1 (success) it uses doUpload, function to store the image on the server, using another request data. However, I do not know how I store the image that is in the form.
I hope it was clear, is that the code is very extensive and it would not be possible to paste here. Thankful