Quote:
Originally Posted by Publisher Bucks
What is the best way to verify that the email being submitted (or blank form) is a valid email? Php?HTML5? Javascript? Something else?
|
Validating an email address syntax in php can be done as described by sarettah. As k0nr4d mentioned, the HTML input will also validate the syntax. However, neither method can determine if the email address actually exists. Even using checkdnsrr will only verify if there is a mail server -- Not that the user exists.
The simplest method to validate the actual email address is to send a verification email to that user whereby they either click the embedded link or paste the verification code into a field, then you check that response against the previous database entry. Include an expiration time where you delete the database entry.
Having an expiration will allow a user to re-submit their data should they initially enter an email with a typo (the user will not receive the validation email). Should that user subsequently submit correct data it will match the database entry and they can continue with your procedure.
Hope this helps.