Return to Snippet

Revision: 6183
at May 5, 2008 14:31 by bsisco


Initial Code
function valid_email($str)
{
	$match = "/^([a-zA-Z0-9]([a-zA-Z0-9_-]*\.?[a-zA-Z0-9])*)(\+[a-zA-Z0-9]+)?@([a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])*\.)*([a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9]+)*)\.[a-zA-Z]{2,6}$/";
	if(preg_match($match, $str)) {
		return TRUE;
	}else{
		return FALSE;
	}
}

Initial URL

                                

Initial Description
this function was provided to me by my partner in crime......thanks superchicken

Initial Title
valid_email function

Initial Tags
php

Initial Language
PHP