Re: Email Validation

From: Date: Tue, 12 Feb 2002 07:58:06 +0000
Subject: Re: Email Validation
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-16848@lists.php.net to get a copy of this message
On Tuesday 12 February 2002 06:19, CrossWalkCentral wrote: > I am working on a form that I have in php and am looking for some advise > on form validation or specifically email address validation so i can > insure that some one has put in a properly formatted email address Well. something like if (!eregi("^[A-Za-z0-9\_-]+@[A-Za-z0-9\_-]+.[A-Za-z0-9\_-]+.*", $email)) { echo "$email doesn't seem to be a valid e-mail address!"; } would do the job. Of course, that doesn't stop people from entering a false email address. You could do a DNS-lookup to see if the domain-part of the address really exists, too. Cheers, Markus -- Markus Lervik Linux-administrator with a kungfoo grip Vaasa City Library - Regional Library markus.lervik@vaasa.fi +358-6-325 3589 / +358-40-832 6709

« previous php.db (#16848) next »