Re: eregi problem

From: Date: Sun, 03 Apr 2005 21:17:44 +0000
Subject: Re: eregi problem
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-212130@lists.php.net to get a copy of this message
emre@vt.com.tr 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

« previous php.general (#212130) next »