> I am looking for code to verify a phone number has been entered correctly on
> a form field. Requirements would include the area code: xxx-xxx-.
You should use a regex for this. Something like...
if (ereg ("[0-9]{3}-[0-9]{3}-[0-9]{4}", $number)) {
print "good\n";
} else {
lto:[EMAIL PROTECTED]]
> Sent: Friday, May 11, 2001 4:52 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] verify phone number
>
>
> I am looking for code to verify a phone number has been
> entered correctly on
> a form field. Requirements would include the area cod
I am looking for code to verify a phone number has been entered correctly on
a form field. Requirements would include the area code: xxx-xxx-.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
3 matches
Mail list logo