0
How can i check the username is available?
I’m creating a sign in page, but how can i check the username is available?
3 Antworten
+ 4
You can't simply create a sign in HTML page, you need to write server code to get user signin submit response from this page, and compare the data with database.
+ 4
I am assuming that you have a Database.
In JavaScript you can use "change" event on a textbox where user is going to type his username.
inputField.addEventListener('change', checkAvailable);
Now the checkAvailable function will check into database if the username that is typed I available or not.
function checkAvailable () {
//Checking code goes here
}
+ 1
In most systems, your registered usernames would most likely be stored in a database or something similar in the backend. When your user submits their preferred username during sign up, you'll crosscheck that string with what you have in your db and make sure that the submitted username is unique. Is this what you meant by "available"?