When creating an online community, website, or social profile, it can be challenging to come up with a username that’s not already taken.
If the username is available, then the user can proceed with registration. If it isn’t, then the user must have to try again with a new username until they find one that is available.
This post will help you check username availability using JavaScript and PHP.
I am using the MySQL database in this tutorial.