How to Create Username Availability Check using PHP
Submitted by alpha_luna on Friday, July 29, 2016 - 17:06.
In this article, we will tackle about Username Availability Check using PHP. This example is common to all of us, and it is popular in the websites. Like “Facebook”, “Gmail”, and etc.
If you are creating your user account, after you input the username in the TextBox the script will check if it is an available username or not.
NOTE: These list of username is not available in this source code example: "rolyn02", "mark111", and "billGates". Because these list is on already in the database.
Username Availability Check Form
This form includes textbox field where the user types their username.
jQuery Script
This is the script for requesting the username availability.
And, this is the output.
Username Not Available
Username Available
If you are interested in programming, we have an example of programs that may help you even just in small ways. Share us your thoughts and comments below. Thank you so much for dropping by and reading this tutorial post. For more updates, don’t hesitate and feel free to visit this website more often and please share this with your friends or email me at [email protected]. Practice Coding. Thank you very much.
- <script>
- function checkAvailability() {
- $("#loaderIcon").show();
- jQuery.ajax({
- url: "check_availability.php",
- data:'username='+$("#username").val(),
- type: "POST",
- success:function(data){
- $("#user-availability-status").html(data);
- $("#loaderIcon").hide();
- },
- error:function (){}
- });
- }
- </script>
If you are interested in programming, we have an example of programs that may help you even just in small ways. Share us your thoughts and comments below. Thank you so much for dropping by and reading this tutorial post. For more updates, don’t hesitate and feel free to visit this website more often and please share this with your friends or email me at [email protected]. Practice Coding. Thank you very much.
Add new comment
- 86 views