I am trying to return a value with ajax for succes and fail but it only returns undefined. This is my script
function loginCheck(email, password, id){
    $.get("inc/ajax/login_check.php",
        {email:email, password:password},
        function(html){
            if(html == 0){
                return 0;
            }
            else{
                return 1;
            }
        }
    );
}
 
    