Re: eregi problem

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

 



emre@xxxxxxxxx wrote:

if((eregi("[^a-zA-Z0-9]",$GP[sifre])


I think that the ^ anchor is your problem, it shall be out of the brackets :

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

(the above is tested and works perfect)

P.S. Take a look here http://www.php.net/manual/en/language.types.array.php#language.types.array.donts

--
Josip Dzolonga
http://josip.dotgeek.org

jdzolonga[at]gmail.com

--
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