Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Sep 2011
    Posts
    69
    Thanks
    6
    Thanked 0 Times in 0 Posts

    email validation not working properly

    Hi,

    I am checking email validation using this code

    if (!preg_match("/^([a-zA-Z0-9])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-]+)+/", $email1))
    {$messages[] = "Email ID is required field / Please enter correct Email ID."; }

    but when I put '_' under email address like (test_1@hotmail.com) it's showing error that Email ID is required field / Please enter correct Email ID.

    How can I enable '_' in this code for email address please help

  • #2


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •