Hi :) When using Firebug i can see it returns 0 or 1, so the php is ok. But seems like ajax server_reponse isnt getting it.. somehow. Anyone see the problem?
j.ajax({
type: "POST",
url: "php/inc/ajax_check_username.php",
data: "username=" + username,
success: function (server_response) {
j("#availability_status").ajaxComplete(function (event, request) {
if (server_response == '0') {
alert('ledig..');
j("#availability_status").html('<p>Ok 0</p> <font color="Green"> Ledig! </font>');
} else if (server_response == '1') {
alert('IKKE ledig..');
j("#availability_status").html('<p>Ok 1</p> <font color="red">Ikke Ledig... </font>');
}
});
} // server resp
});