I have a simple registration script I’m practicing with and I was wondering how I could check for special characters and numbers. Basically, for the user name area, no special characters are allowed. For the first name , last name area, no special characters and numbers are allowed. Would this be a regex operation?
Share
When I post information to php from a form I like to use the ctype functions, its what they are for.
http://php.net/manual/en/book.ctype.php
So if you wanted to a-zA-Z you could
Or if you wanted a-zA-Z0-9 you could