View Single Post
Old 08-06-2022, 01:05 AM  
Coyote
Drinker of Scotch
 
Industry Role:
Join Date: May 2003
Location: Texas
Posts: 242
Quote:
Originally Posted by Publisher Bucks View Post
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.
__________________
Ethernet Servers

Quote:
CS: Linux can pretty much run on a potato. Which is a GOOD thing.
Coyote is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote