Posts Tagged ‘PHP’

I’ve always used JavaScript to validate e-mail addresses. However, it’s best not to rely solely on JavaScript for such things due to accessibility issues. For this reason I’ve begun using PHP for e-mail validation. While I’m quite adept at creating functions for various other (simpler) aspects of form validation, verifying the validity of an e-mail address submitted by a user is a little too much for my pea size brain to cope with. Having scoured the web quite comprehensively, the following is by far the most effective solution I’ve found so far:

http://www.linuxjournal.com/article/9585

It’s not exactly a one-line solution but it certainly does the trick better than anything else I’ve found. It’s also pretty easy to understand and, if you so wish, edit. I hope you find it useful!

Add This! Blinkbits Blinklist Blogmarks BlogMemes BlueDot BlogLines co.mments Connotea del.icio.us de.lirio.us Digg Diigo DZone Facebook FeedMeLinks Folkd.com Fleck Furl Google Google Reader icio.de IndianPad Leonaut LinkaGoGo Linkarena Linkter Magnolia Mister Wong MyShare Ask.com MyStuff Ask.com Yahoo! MyWeb Netscape Netvouz Newsgator Newsvine Oneview.de RawSugar reddit Rojo Segnalo Shadows Simpy SlashDot Smarking Sphere Spurl Startaid StumbleUpon TailRank Technorati ThisNext yigg.de Webnews.de ReadMe.ru Dobavi.com Dao.bg Lubimi.com Ping.bg Pipe.bg Svejo.net Web-bg.com Plugin by Dichev.com
6 Aug 2009

PHP e-mail validation

Author: Adam | Filed under: PHP, Web Design