1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
| $('#manage-user').submit(function(e){
e.preventDefault();
start_load()
$.ajax({
url:'ajax.php?action=update_user',
data: new FormData($(this)[0]),
cache: false,
contentType: false,
processData: false,
method: 'POST',
type: 'POST',
success:function(resp){
if(resp == 1){
alert_toast("Data successfully saved",'success')
setTimeout(function(){
location.reload()
},1500)
}else{
$('#msg').html('<div class="alert alert-success">Username already existt </div>')
end_load()
}
}
})
}) |
Partager