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?) 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"; ?> 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 ? 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 . Link to comment https://forums.phpfreaks.com/topic/78764-e-mail-vertification/#findComment-398616 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.