HELP ME

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
yasmin958
Forum Newbie
Posts: 1
Joined: Wed Jul 08, 2009 5:24 am

HELP ME

Post by yasmin958 »

Dear friends,
php code for validate a email in a text box?
SvanteH
Forum Commoner
Posts: 50
Joined: Wed Jul 08, 2009 12:25 am

Re: HELP ME

Post by SvanteH »

First of all may I suggest a more descriptive title and more respect to the people that reply instead of just "give, give, give"

You can use preg_match and use the pattern ^[_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+([a-z]{2,3}$) to check whether the email is valid or not. There's several email patterns varying in the internet because of the complexity of an email. This is just one I got.

Svante
Post Reply