need help on ereg statement

From: Date: Sat, 04 May 2002 12:42:34 +0000
Subject: need help on ereg statement
Groups: php.general 
Request: Send a blank email to php-general+get-96038@lists.php.net to get a copy of this message
Hi there, I am trying to validate a password. Only characters in the alphabet and numbers should be allowed. Somehow my statement does not work at all :-( if (ereg("^[A-Za-z0-9]",$new_passw)) echo 'invalid'; Can anybody help on that? Thanx in advance, Andy

« previous php.general (#96038) next »