Results 1 to 4 of 4
  1. #1
    Full Member dak142's Avatar
    Join Date
    January 17th, 2005
    I am putting a form on my website to collect email address for a newsletter. Is there a way of validating that the email address is at least in the general form of an address.

    Like, I have been trying to do it in PHP but what I have seems to let ANYTHING go through to the database. Any ideas on what I can do?

  2. #2
    Full Member
    Join Date
    January 17th, 2005
    You probably need to get your mind round regular expressions.
    They are tricky the first time, and my brain hurts every time I use them, but they are worth the effort.

    For a thread on using them with PHP and email addresses see

    Better still also check it with Javascript using onSubmit event

    for example of using regular expression to validate email addresses in Javascript

    Hope that helps


  3. #3
    ABW Ambassador
    Join Date
    January 18th, 2005
    Honiara, Solomon Islands
    <pre class="ip-ubbcode-code-pre">if((!ereg(".+\@.+\..+",$Email)) || (!ereg("^[a-zA-Z0-9_@.-]+$",$Email))){$error.="Your error message here.";} </pre>

    $email= the variable you have stipulated and the Name of your email input box.

    Let me know if you need more help and I'll write it for you.

  4. #4
    ABW Adviser Panel Dynamoo's Avatar
    Join Date
    January 18th, 2005
    Opposite the Slough of Despond
    I use Topica - - which handles everything for me, for free. It sometimes bundles some fairly irrelevant advertising links, but I've been happy with it.
    Innovative advertising with Slimeware Corporation and Telephore. Mail-order fuel with Petrol Direct.

  5. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. New to ShareASale - Waiting for validation email
    By w3expose in forum ShareASale - SAS
    Replies: 6
    Last Post: February 15th, 2011, 02:51 PM
  2. AM sends email out to Affiliate list with our email Address Showing
    By glittered in forum Commission Junction - CJ
    Replies: 27
    Last Post: January 26th, 2007, 11:06 PM
  3. Validation error on change of address
    By La_Valette in forum Rakuten LinkShare - LS
    Replies: 2
    Last Post: December 29th, 2006, 10:44 AM
  4. Email Validation
    By popdawg in forum Rakuten LinkShare - LS
    Replies: 2
    Last Post: December 8th, 2006, 11:35 AM
  5. Email address ina SQL database... How to send out mass email?
    By jackson_media in forum Programming / Datafeeds / Tools
    Replies: 4
    Last Post: February 12th, 2006, 03:54 PM

Posting Permissions

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