Check if username exist with AJAX

The problem is with your jQuery selector:

var usr = $("#site-addres-input").attr('value');

Will get the default value of the input element. Typically this will be blank, because you’re not setting it ahead of time. You need to use:

var usr = $("#site-addres-input").val();

I’m also noticing that you’re using #site-addres-input, but “address” has two s at the end. Not sure if this is also causing you a problem or not …

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)