On Sat, May 04, 2002 at 02:42:34PM +0200, Andy wrote:
> if (ereg("^[A-Za-z0-9]",$new_passw))
if (!preg_match("/^[a-zA-Z0-9]*$/", $new_passw)) {
echo "invalid";
}
preg-power! :)
--
Trond Arve Nordheim
- "This message is ROT13-encrypted twice for extra security."
--
PHP General Mailing Lis
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
--
PHP General Mailing List
2 matches
Mail list logo