PHP Tutorial : Validate email address – simple way with filter_var() function
Jul 26, 2009 Useful PHP
While browsing php.net without any scope I discovered a very cute & nice way to replace the usual regular expression email checking thing.
That way is via filter_var() php function which does the things 10 times faster :
<?php $email = "someone@example.com"; if (!filter_var($email, FILTER_VALIDATE_EMAIL)) { echo "Invalid email address"; } ?>


August 30th, 2009 at 10:55 pm
[...] :: readytousesolutions Share and [...]