Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Checking username availability with ajax using jQuery
- //use ajax to run the check
- $.post("check_username.php", { username: username },
- function(result){ alert(result);
- //if the result is 1
- if(result == 1){
- //show that the username is available
- $('#username_availability_result').html(username + ' is Available');
- }else{
- //show that the username is NOT available
- $('#username_availability_result').html(username + ' is not Available');
- }
- });
Add Comment
Please, Sign In to add comment