| 
 Posted by Rik on 07/03/17 11:51 
Jon Thompson wrote: 
> I use this to validate the email address entered into a form. Might be 
> useful: 
> 
> function ValidateEmailAddress($EmailAddress){ 
>         $EmailAddress = strtolower(trim($EmailAddress)); 
>         if 
> (!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z 
>                 {2,4})$", $EmailAddress)){ return FALSE; 
>         } else { 
>                 return $EmailAddress; 
>         } 
> } 
 
Which will exclude a lot of valid emailadresses. We recently had a 
discussion on this on comp.lang.javascript. Check 
http://en.wikipedia.org/wiki/Email_address#Limitations 
 
Grtz, 
--  
Rik Wasmus
 
  
Navigation:
[Reply to this message] 
 |