nezbo Posted December 20, 2007 Share Posted December 20, 2007 Hi all is there any way to verify an email address... i am looking for something like this... if ($_POST['emailAddress'] like "%@%.%") Neil Link to comment https://forums.phpfreaks.com/topic/82491-solved-php-email-verifcation/ Share on other sites More sharing options...
~n[EO]n~ Posted December 20, 2007 Share Posted December 20, 2007 Here <?php if (preg_match('/^[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i', $_POST['emailAddress'])) { echo 'Email entered is valid'; } else { echo 'Email entered is not valid'; } ?> Link to comment https://forums.phpfreaks.com/topic/82491-solved-php-email-verifcation/#findComment-419338 Share on other sites More sharing options...
nezbo Posted December 20, 2007 Author Share Posted December 20, 2007 cheers That worked a treat. Link to comment https://forums.phpfreaks.com/topic/82491-solved-php-email-verifcation/#findComment-419357 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.