----- Original Message ----- 
From: <[EMAIL PROTECTED]>
>
> I use preg_match to validate the Middle Initial field of a form and so far
> it works, except yesterday a user submitted a "0" (zero) as a middle
> initial!  My regexp is:
>
> if (!empty($_POST[MI]) && (preg_match('/^[[:alpha:]]{1,1}$/', $_POST[MI])
== 0))
>
> I tested it with 0-9 and my regexp catches every digit except 0.
Curious...
>
Maybe it thinks it's the letter O, have you tried using a font that puts a
line through the zero;-)

[sorry couldn't resist]

Cheers, Greg.



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

Reply via email to