www.webdeveloper.com
Results 1 to 3 of 3

Thread: Verifying Data on a Web Form

  1. #1
    Join Date
    Nov 2006
    Posts
    2

    Verifying Data on a Web Form

    This may sound like a silly question - I have a form on my site - used for lead generation - we ask all of the standard questions - the qualifier questions determine the 'heat' of the lead. About 1/3 of the time - I will get leads that are determined to be 'hot' but the contact information is crap - generally nonsense typed into the form. What is the best way for me to somehow validate that data? I especially want to be sure the e-mail address and phone numbers are valid - or at the very least - recognize that there are invalid entries and kick the data out. Any suggestions?

  2. #2
    Join Date
    Jun 2003
    Location
    here
    Posts
    4,551
    that best way to validate email would properly be to send an email out, if they don't click a link in that email you boot them back.

    alternativly you could run a regular expression to check the emails validity.
    Code:
      dim isValidE
      dim regEx
      
      isValidE = True
      set regEx = New RegExp
      
      regEx.IgnoreCase = False
      
      regEx.Pattern = "^[a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$"
      isValidE = regEx.Test(myEmail)
    If you are using PHP please use the [PHP] and [/PHP] forum tags for highlighting...
    The same applies to HTML and the forums [HTML][/HTML] tags.

  3. #3
    Join Date
    Nov 2006
    Posts
    2

    Thanks!

    Ouch! I just slapped my forehead in a 'Why didn't I think of that' moment!! Thanks!! This is a great suggestion!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles