I wanna write a quick php strong validation, to check a user entry is alphanumeric only.. i'm using ereg and i can't make it work.. everytime it just ignores what i've put. any ideas?
the code is:
if(ereg("[[:alnum:]]", $uname))
{
do stuff
}
else
{
tell em its not alphanumeric
}
cheers /Sib
programmer in the making
icq: 44167565
e-mail: siberdude@ntlworld.com
the code is:
if(ereg("[[:alnum:]]", $uname))
{
do stuff
}
else
{
tell em its not alphanumeric
}
cheers /Sib
programmer in the making
icq: 44167565
e-mail: siberdude@ntlworld.com