I have read some answers in the forum, but none have solved my problem, Ajax works on the site, but when upload does not work, follow the code:
jQuery('#formLogin').submit(function(){
var dados = jQuery( this ).serialize();
jQuery.ajax({
type: "POST",
url: "script/logar.php",
data: dados,
success: function( data ) {
var y = data.length;
if (y == 9) {
window.location.href = "editar-perfil.php";
}
return false;
}
}
});