Nov/06
20
How to Display Username Suggestions in PHP Sign up Form?
1 Comment | Posted by Buddy Toups in MySQL, PHP, Web Development

I recently work on a website project where the client wanted to suggest alternative usernames if it already existed in the database. At first I was not sure how this would work in code, but then it hit me, use the data in the form.
In the form was the user’s first and last name, their birthday, favorite pet (for security purposes), and more. With this data we can make logical suggestions to our user.
HTML Output for “Bob Smith”
- BobS
- BSmith
- BobS2006
- BobS06
- BSmith2006
- BSmith06
As you can see we can extend this code further.
1 Comment for How to Display Username Suggestions in PHP Sign up Form?
s40er | October 2, 2007 at 1:26 pm














Thanks for sharing this. It’s simple and effective.