takn25 Posted February 16, 2011 Share Posted February 16, 2011 Hi, I have a user system where people login to my site with their emails. The thing I am after is when a person is registering I want to validate that they have entered a valid email with @.com in the string and not just some repetitive characters e.g. wwwwwww. Could some one guide me what is the best way to check for a valid email and for repetive characters in any given field examle firstname. One last thing I would also like to check that a person only enters Alphabets for name and stuff. Link to comment https://forums.phpfreaks.com/topic/227845-validating-help/ Share on other sites More sharing options...
silkfire Posted February 16, 2011 Share Posted February 16, 2011 You have to learn what REGEX is. Link to comment https://forums.phpfreaks.com/topic/227845-validating-help/#findComment-1174907 Share on other sites More sharing options...
cyberRobot Posted February 16, 2011 Share Posted February 16, 2011 As far as I'm aware, there isn't a way to make sure an e-mail is valid. The closest solution would be to send them an e-mail that they need to respond to. As silkfire mentioned, REGEX is probably what you're looking for. The resource I turn to for help with regular expressions is: http://weblogtoolscollection.com/regex/regex.php Just keep in mind, that if you use a REGEX solution, visitors can still submit e-mail addresses like "[email protected]" Link to comment https://forums.phpfreaks.com/topic/227845-validating-help/#findComment-1174990 Share on other sites More sharing options...
Pikachu2000 Posted February 16, 2011 Share Posted February 16, 2011 The closest solution would be to send them an e-mail that they need to respond to. There, just to reiterate . . . Link to comment https://forums.phpfreaks.com/topic/227845-validating-help/#findComment-1175271 Share on other sites More sharing options...
cyberRobot Posted February 16, 2011 Share Posted February 16, 2011 The closest solution would be to send them an e-mail that they need to respond to. There, just to reiterate . . . For reference, I said "closest" because you can still get around these solutions. You could for example create a tempory e-mail account, fill out the form, confirm the e-mail, and close the e-mail account. Link to comment https://forums.phpfreaks.com/topic/227845-validating-help/#findComment-1175275 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.