How to restrict public email id for registration in PHP?
I have a registration form that uses any kind of emails for registration. I want to restrict it to company mail id's only. In other words, no free email service provider's mail id would work for registration. Since you have not provided any additional information as to how E-mail addresses are being defined and/or entered into a form or not, am submitting the following using PHP's preg_match() function, along with b and i pattern delimiters and an array. b - word boundary i - case insensitive http://php.net/manual/en/function.preg-match.php The following will match against "gmail" or "Gmail"