Re: Removing Invalid Users

From: Date: Wed, 04 Jul 2001 18:22:33 +0000
Subject: Re: Removing Invalid Users
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-56212@lists.php.net to get a copy of this message
You can check that the *format* of the address is valid by using regular expressions.. look at the regular expression pages on php.net (especially the users comments.. they do exactly that!) As for checking whether it is a real email or not.. you can't test this without actually sending them an email (and even then you can't be sure)... if you could check then it would be too nice for spammers! What you can do in addition is to check that the domain is a valid domain (ping?) HTH,Tom ----- Original Message ----- From: "Clayton Dukes" <cdukes@cdukes.com> To: <php-general@lists.php.net> Sent: Wednesday, July 04, 2001 7:16 PM Subject: [PHP] Removing Invalid Users > Howdy folks, > > How can I write code that will search the database and check the validity of > an email address, and if it's bad, to remove that entry from the database? > > Here's a dump one of the tables: > > INSERT INTO users VALUES > > (1,'','username','email@email.com','','','001.gif','Jul > 04, > 2001','','title','location','text','',0,0,'','','','field',10,'',0,0,0,'',0, > '','Default',4096,0); > > ie: > if the email field is bad (test using sendmail?) > remove that entry from the database. > > How can I do this? > > TIA! > > Clayton Dukes > CCNA, CCDA, CCDP, CCNP > Download Free Essays, Term Papers and Cisco Training from http://www.gdd.net > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#56212) next »