Email confirmation during registration

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gwidaz
    New Member
    • Jul 2011
    • 1

    Email confirmation during registration

    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..
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    Code:
    filter_var($email, FILTER_VALIDATE_EMAIL);

    Comment

    • cutesrivastavaabhi
      New Member
      • May 2010
      • 8

      #3
      You are using gmail authentication script that's why it checking only gmail users. Use email function and check or remove gmail from the script.

      Thank You
      Last edited by Niheel; Jul 16 '11, 09:14 PM. Reason: spelling & punctuation

      Comment

      Working...