How do i validate my email & phone number field

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
adsegzy
Forum Contributor
Posts: 184
Joined: Tue Jul 28, 2009 9:26 am

How do i validate my email & phone number field

Post 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
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

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

Post by requinix »

Google for the email and ctype_digit for the phone number.
Cirdan
Forum Contributor
Posts: 144
Joined: Sat Nov 01, 2008 3:20 pm

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

Post by Cirdan »

You would want to use a regular expression to check the email. Read this
Post Reply