verN Posted March 17, 2007 Share Posted March 17, 2007 I had the following working but since I changed the email variable to an array it doesn't work. email[] This is part of an edit form where emails in the mailing lists can get updated however, before they get updated i need to check that each of the email addresses are valid.But the code doesn't work for the array. // checks for a email address through POST. if ((isset($_POST['email']))) { $eAdd=$_POST['email']; } if (eregi ('^[[:alnum:]][a-z0-9_\.\-]*@[a-z0-9\.\-]+\.[a-z]{2,4}$', stripslashes($_POST['email']))) { //stores the email address $eAdd= trim($_POST['email']); } else { $error[]= 'Please enter a valid email address!'; } thanks Link to comment https://forums.phpfreaks.com/topic/43111-email-array-checking-validity-of-email-address/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.