Hi,im trying to make registration form..And i want that users can use just couple of emails to register..I will try to explain what i mean:
Im using code to check mail:
function checkEmail($str )
{
return preg_match("/^[\.A-z0-9_\-\+]+[@][gmail_\-]+([.][com_\-]+)+[A-z]{1,4}$/", $str);
}
This works fine if u trying to register for example with sample@gmail.co m..But confusing moment is if i want to add more emails to check..
If i add more functions for email check it comes to fail.. because if i will add another checkemail function (for example hotmail) and in register form i will try to add hotmail.com it wont allow because first check is with gmail..
So i want to ask u guys,how to make check mail function for 5,6 or more emails???
I hope u guys understand what i mean..If not i will try to explain more..
Sorry for my bad english..
Im using code to check mail:
function checkEmail($str )
{
return preg_match("/^[\.A-z0-9_\-\+]+[@][gmail_\-]+([.][com_\-]+)+[A-z]{1,4}$/", $str);
}
This works fine if u trying to register for example with sample@gmail.co m..But confusing moment is if i want to add more emails to check..
If i add more functions for email check it comes to fail.. because if i will add another checkemail function (for example hotmail) and in register form i will try to add hotmail.com it wont allow because first check is with gmail..
So i want to ask u guys,how to make check mail function for 5,6 or more emails???
I hope u guys understand what i mean..If not i will try to explain more..
Sorry for my bad english..
Comment