Currently, I am facing an issue where I have a script that returns a string value. When using the alert function, the correct value is displayed. However, after implementing an if condition to compare the data with the value from login.php, the alert message does not show up as expected.
$("#login").click(function(event){
event.preventDefault();
var Email = $("#email").val();
var Password = $("#password").val();
$.ajax({
url : "include/login.php",
method : "POST",
data : {CustomerLogin:1,CustomerEmail:Email,CustomerPassword:Password},
success : function(data){
if(data == 'true'){
alert(data);
}
}
})
})