Valid email
#1

It's possible to check if input email is valid? i mean it's created in website gmail.com, yahoo.com and in any other?
Reply
#2

I don't think so. But you can check if the player has entered a valid email though.

Eg:

someone@example.com is valid
someone.com is not valid
someone@s is not valid
Reply
#3

You could also check if the e-mail provider is valid. So you have a list of many e-mail providers which you found.
like gmail,freenet,aol etc. Then you make an array of them and when a play enters the e-mail you check if the e-mail provider is listed in the array.
Reply
#4

Only what you can detect about that is domain of email company and format (something@domain.com) that`s all.
Reply
#5

Quote:
Originally Posted by SoLetsGO
Посмотреть сообщение
You could also check if the e-mail provider is valid. So you have a list of many e-mail providers which you found.
like gmail,freenet,aol etc. Then you make an array of them and when a play enters the e-mail you check if the e-mail provider is listed in the array.
That's really a dumb solution, to be honest. I have an e-mail address under my own domain, which will surely not be in your array.

The most thorough solution is a regular expression. But if you don't want to use that plugin you can probably also get by using sscanf, using something like:
PHP код:
"{s[256]'@'s[256]'.'s[256]}" 
Since it's a quiet expression (curly braces) string size does not matter.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)