I want to upload an image to my server, and control the PHP echos in my HTML code. To do this I want to use jQuery Ajax, but I don\'t know how to send the image with Ajax to PHP
$(".form").submit(function(){ $.ajax({ url: 'core/ctrlAdmin.php?prodInBD', type: 'POST', async: false, data: new FormData(this); success: function(respuesta){ /* RECIVE HERE THE PHP ECHO */ } }); });