Re: email address syntax checker

From: Date: Thu, 20 Jan 2011 06:38:31 +0000
Subject: Re: email address syntax checker
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-310893@lists.php.net to get a copy of this message
On 20 January 2011 05:14, Donovan Brooke <lists@euca.us> wrote: > Hi Guys, > > I'm waddling my way through database interaction and thought someone on the > list may already have a simple email checker that they'd like to share... > > you know, looking for the @ char and dots etc.. > > I did a quick search of the archives and found a couple elaborate things.. > but > I'm looking for something simple. This job will have trusted users and > the checker is more to help them catch mistakes when registering. if (!filter_var($email, FILTER_VALIDATE_EMAIL)) { echo "Bad user! Bad user!"; } Regards Peter -- <hype> WWW: plphp.dk / plind.dk LinkedIn: plind BeWelcome/Couchsurfing: Fake51 Twitter: kafe15 </hype>

« previous php.general (#310893) next »