asmith Posted November 25, 2007 Share Posted November 25, 2007 i want to put some limits for e-mail vertification (e-mail that a user type in registration form) but don't know exactlly what symbols i should limit , shold i just : (!preg_match("/@/",$_POST['email_address']) is this enough ? or are there any other symbols i should limit beside of checking for @ sign ? (or e-mail addresses can contain any symbol?) Quote Link to comment https://forums.phpfreaks.com/topic/78764-e-mail-vertification/ Share on other sites More sharing options...
~n[EO]n~ Posted November 25, 2007 Share Posted November 25, 2007 See this <?php if(!ereg("[0-9a-z]([-_.]?[0-9a-z])*@[0-9a-z]([-.]?[0-9a-z])*\\.[a-z]", $_POST['email_address'])) echo "Email not valid"; ?> Quote Link to comment https://forums.phpfreaks.com/topic/78764-e-mail-vertification/#findComment-398603 Share on other sites More sharing options...
asmith Posted November 25, 2007 Author Share Posted November 25, 2007 <?php if(!ereg("[0-9a-z]([-_.]?[0-9a-z])*@[0-9a-z]([-.]?[0-9a-z])*\\.[a-z]", $_POST['email_address'])) echo "Email not valid"; ?> this code accept upper case letters? what does "?" means ? both side characters can combine ? Quote Link to comment https://forums.phpfreaks.com/topic/78764-e-mail-vertification/#findComment-398606 Share on other sites More sharing options...
~n[EO]n~ Posted November 25, 2007 Share Posted November 25, 2007 If you want all the explanations and some examples go here http://www.phpfreaks.com/forums/index.php/topic,96280.0.html And, I also found a good way to validate e-mail. That is the board where this question belongs . Quote Link to comment https://forums.phpfreaks.com/topic/78764-e-mail-vertification/#findComment-398616 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.