Re: Email Validation

From: Date: Fri, 08 Mar 2002 02:10:39 +0000
Subject: Re: Email Validation
References: 1 2  Groups: php.db 
Request: Send a blank email to php-db+get-17562@lists.php.net to get a copy of this message
How would I go about doing the DNS look up part? "Markus Lervik" <markus.lervik@vaasa.fi> wrote in message news:200202120803.g1C83dI16048@vaasa.vaasa.fi... > 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 (#17562) next »