inc/toolkit.inc.php
changeset 176 18905ae8cca3
parent 164 4c6adb48dcfd
child 192 3d18290ac993
equal deleted inserted replaced
175:0345d21f21b0 176:18905ae8cca3
   349 	$val = str_replace('##MAILIP##', $mailip, $val);
   349 	$val = str_replace('##MAILIP##', $mailip, $val);
   350 	return $val;
   350 	return $val;
   351 }
   351 }
   352 
   352 
   353 
   353 
   354 /*
   354 function is_valid_email($address) {
   355  * Validates an email address.
   355 	$fields = split("@", $address, 2);
   356  * Checks if there is something before the at '@' sign and its followed by a domain and a tld of minimum 2
   356 	if((!eregi("^[0-9a-z]([-_.]?[0-9a-z])*$", $fields[0])) || !is_valid_hostname_fqdn($fields[1], 0)) {
   357  * and maximum of 4 characters.
       
   358  */
       
   359 function is_valid_email($email)
       
   360 {
       
   361 	if(!eregi("^[0-9a-z]([-_.]?[0-9a-z])*@[0-9a-z]([-.]?[0-9a-z])*\\.([a-z]{2,6}$)", $email)) {
       
   362 		return false;
   357 		return false;
   363 	}
   358 	}
   364 	return true;
   359 	return true;
   365 }
   360 }
   366 
   361