PHP email validation function script snippet check correct emails

Mobile
feeds
Welcome Login | Register

PHP email validation function script snippet check correct emails
Reply Your Comments:
Click this button if you are interested in replying to this topic and leave your comments
Sent To Friend
CLick this button if you want to send this page to a friend.
Subsribe To Rss Feeds
Subscribe to RSS
CLick this button if you want to subscribe to this RSS Feed. You can use your browsers feeds burners if you have mozilla or internet explorer 7 or higher and keep up with updates.
  Forums Index
      » Snippets Forums
        » » PHP email validation function script snippet check correct emails
PHP email validation function script snippet check correct emails
Post Description: php email validation function script snippet check correct emails Snippets
Post Tags:
This Post Has Been Viewed 587 Times Since Sun Feb 24, 2008 10:45 am Author hostman with 3 replies
Next Post »» display array elements values with loop
PHP email validation function script snippet check correct emails
Advertise On This Page




thanks to www.webune.com for helping us with this questions.

i needed a function or class to check on my user's email to verify that the emails address they were providing was correct. so here is a useful email verification function.

this function just checks that the format of the email is correct:

function check_email($email) {
	$validation = TRUE;
	if(!eregi("^[_a-z0-9-]+(.[_a-z0-9-]+)*@[a-z0-9-]+(.[a-z0-9-]+)*(.[a-z]{2,4})$", $email)) {
		$validation = FALSE;
	}
	return $validation;
} 


hope this helps

USAGE:
if(!check_email($mail)) { 
	$error .= "EMAIL  - The Email You Provided Is not Valid";
}



Leave Your Comments

Your Name
Your Email Address (Will Not Be Published)
Notify Me When Someone Replies to this Page
(An email will be sent to you when someone replies to your comments)
Your Comments
Include A Picture with your comments
Share
| More
Share this page by putting this URL in your comments to other websites like myspace, Facebook, Twitter friendster, Hi5, Groups, Boards, Forum or others. Just Copy and Paste this Code
URL:
To embed this topic, just copy the code from the "Embed" box. Once you've copied the code, just paste it into your website or blog to embed it.
Embed:
BBCODE is use on forums. You can put this code on all your BBCODE enabled forums like PhpBB, vBulletin® and others. Just Copy and Paste this code on your Posts and Replies on your forums
BBCODE:
Subscribe Feeds
Webmasters - Exchange Links With Us. Add related websites to this topic
Add Link:
Links Related to : PHP email validation function script snippet check correct emails

Comments and replies About PHP email validation function script snippet check correct emails
:: 1 :: Reply #45029 Reply By Max On Tue Mar 11, 2008 10:38 am
Max:
great job hommie, came in just handy.
thanx.
:: 2 :: Reply #59290 Reply By Jennifer On Wed Jun 25, 2008 8:01 am
Jennifer:
i guess nyk in reno does not exist any more. i called both of the phone numbers that you gave me and no luck. the zz4-34y-xxzx has been disconected and when i called nyk in vegas they said they confirmed that reno

please let me know where you would like to go from here.
:: 3 :: Reply #59749 Reply By kakoje On Mon Jun 30, 2008 12:04 am
kakoje:
gsdgsggsagsa