eregi problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I m trying to check $GP[sifre] variable, $GP[sifre] must consist of alpha
numeric chars only. here, how I check the variable:

if((eregi("[^a-zA-Z0-9]",$GP[sifre])
    echo 'true';
else
    echo 'false';

It works if variable starts with alphabetic chars only.
for example this returns 'ok'
    $GP[sifre]='blabla234243';
but this does not work: (if variable starts with numeric chars)
    $GP[sifre]='3243242blabla';

second one returns false, couldnt figure out the problem here. any help ?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux