Jump to content

Archived

This topic is now archived and is closed to further replies.

play_

Question about usernames

Recommended Posts

Why is it that most sites only allow letters, numbers and underscores in usernames?
what's wrong with using spaces or . or ()...

?

Share this post


Link to post
Share on other sites
Btw, i orginally posted this in the phpnewbie forum because i thought it had something to do with how .'s and spaces and other characters would affect the database.

Share this post


Link to post
Share on other sites
When you start using spaces and sybols, they tend to interfer with scripts and other programs. Take for instance. if you have a username john's, if you try to reference that name in php with something like this $username = 'john's'; you will get an error because of the single quote in the username. you would have to add $username = 'john\'s'; to get it to work. Now imagine if you had a script that put names into arrays, you would be in a world of hurt trying to figure out why things are not working correct.

Hope that explains it. It is not really a rule, more like a guideline to make life easier.

Ray

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.