Kristopher
Photographer
- Dec 25, 2010
- 803
- 68
How can I stop users from making usernames like this...
Was really lazy sorry. Besides it bring it back to light so if anyone wants to know they can. So please sttttfffffffffuuuuuuuuuuuTry searching next time
Code:final public function validName($username) { if(strlen($username) <= 25 && preg_match("/^[a-zA-Z0-9]+$/", $username)) { return true; } return false; }