help with ctype_alnum

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
mydimension
Moderator
Posts: 531
Joined: Tue Apr 23, 2002 6:00 pm
Location: Lowell, MA USA
Contact:

help with ctype_alnum

Post by mydimension »

i have a form that checks the given username for validity using the following if condition:

Code: Select all

(($_POSTї'username'] == "") || (strlen($_POSTї'username']) < 6) || (strlen($_POSTї'username']) > 16) || ctype_alnum($_POSTї'username']))
in the form i have tried inputing "mydimension" so that $_POST['username'] = "mydimension". before i put in the ctype_alnum function this condition would return true. now with the ctype_alnum function it returns false. any ideas?
User avatar
mydimension
Moderator
Posts: 531
Joined: Tue Apr 23, 2002 6:00 pm
Location: Lowell, MA USA
Contact:

Post by mydimension »

nevermind, i didn't negat the ctype function. feel free to hand me the Darwin award.
Post Reply