You were dragging a value of 1 through the request, that is, it means that the login is there, as through $.

    1 answer 1

    $.ajax({ type: 'POST', url: 'xxx', data: mata, success: function(data) { //допустим что тебе в ответ пришла единица, т.е. data == 1 if (data == 1) { alert('ЛОГИН ЗАНЯТ'); } } }); 

    Please read your question before posting it. Try to comprehend the speech structure yourself, respect other people.

    • Thanks for the answer, but something. With the code above does not work, can you explain it in more detail? - Ilenya
    • url - hopefully replaced with your own; mata - your input; What does your data output in the success function? - blatube.com
    • Thanks to everyone, I partially solved the problem myself, but it’s really so, but substitute the request value instead of "mata" which is higher - Ilenya