Who can solve my broken İF-ELSE method. I use ajax and I am %100 sure this ( e ) = "Update Succesful.". to understand check Picture. when you check the picture that I added, you can see there that "update succesful." strinf (ı mean 'e' ) same with if. but if not working.
$.ajax({
url:'ajax.php', // serileştirilen değerleri ajax.php dosyasına
type:'POST', // post metodu ile
data:guncelleform, // yukarıda serileştirdiğimiz gonderilenform değişkeni
contentType:false,
cache:false,
processData:false,
success:function(e){ // gonderme işlemi başarılı ise e değişkeni ile gelen değerleri aldı
if (e == "Update Succesful.") {
Toastify({
text: e,
duration: 3000,
close:true,
gravity:"top",
position: "right",
backgroundColor: "#32FF00",//Green Color code that mean is update Succesfull
}).showToast();
}else{
Toastify({
text: e,
duration: 3000,
close:true,
gravity:"top",
position: "right",
backgroundColor: "#FF0000",//RED Color code that mean is update unsuccesfull
}).showToast();
}
// $("#sonuc").html("").html(alert(e)); // div elemanını her gönderme işleminde boşalttı ve gelen verileri içine attı
}
});