-
PHP Username Suggestion
I wonder if someone could help.
Im looking for some code to use (preferrablly php) wwhich will link t my MySql database.
What i am trying to do:
1. Someone enters their name, first and last.
2. They create a username, for use on a site.
3. The username is taken, so the page shows a few options that are available, which basially is a return mix of their first and last name and a random number.
I suppose for an example, its a bit like the username suuggestions found on the ebay page.
https://scgi.ebay.co.uk/ws/eBayISAPI...www.ebay.co.uk
havlf way down, where you check availability of usernames and if taken a selection are automatically returned to the user.
Anyone have any ideas, or can point me the right dirctio where i can find the code for this sort of thing??
Would be greatly appreciated
regards
Neil
-
-
I personally hate the suggestions. They just don't ever fit what I want.
It's not that complex, in theory.
I think the best way is to general a name... like...
$suggestion = $first.$last.rand([params]);
that would give you something like johnsmith42
then you would want to check that against a database to see if it too was taken.
There are various ways you could rearrange the name.
I would also consider using their first choice username to generate a suggested username as opposed to using their actual name, since that is likely to be closer t what they want.
Daniel -
Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
-
-
hi,
Thanks
Is there anywhere i might find an example of this working, in code?
Regards
Neil
-
-
It's very specific overall.
How does it interact with the database, for example?
Post the code you have and we could help you include this step in it.
Daniel -
Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks