SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Apr 2009
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question preventing fake email addresses entering a database?

    Hi there
    Just wondering if anyone has any neat tricks for stopping fake email addresses from entering a database. Currently I use a regex to check for a valid email address - /^[a-zA-Z0-9._-]+@[a-zA-Z0-9-]+\.[a-zA-Z.]{2,7}$/ but of course it still lets in junk such as zpbswj@chzsyr.com or duzoml@okmsrm.com. I am using php & a mysql database.

    Any ideas on the best way to stop this?

  2. #2
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,140
    Mentioned
    190 Post(s)
    Tagged
    2 Thread(s)
    The best way to ensure an email address is both valid (syntax) and authentic (real) is to send an email to that address with a confirmation link. A fake address will never get the email, and once it's confirmed you know it's real, at least at that point in time.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •