Page 1 of 1

How do i validate my email & phone number field

Posted: Sun Dec 13, 2009 9:18 pm
by adsegzy
Hello,

Please I need the php code to check the email and phone number format being entered by my visitors if the email and phone number are in correct format. that is the email must has @ and . in it, and to check that the phone number field consist of only numbers and not alphabets.

Regards

Re: How do i validate my email & phone number field

Posted: Sun Dec 13, 2009 9:56 pm
by requinix
Google for the email and ctype_digit for the phone number.

Re: How do i validate my email & phone number field

Posted: Sun Dec 13, 2009 11:32 pm
by Cirdan
You would want to use a regular expression to check the email. Read this