1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 1999
    Rep Power
    Hi everyone, I need a bit of help with something and being new to PHP I am a little lost.

    I have a website that is about to go live in a couple months.

    I have a form that allows people to enter their email address to be notified when the site is launched.

    I want to be able to parse the mysql database (that I have setup to store the addresses) to check for duplicates of the email address.

    If the addresses is not in the dbase then go ahead and store it, otherwise send them to a page that tells them their email addresses has already been entered.

    ANY help would be greatly appreciated.


  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2000
    Englewood, CO
    Rep Power
    Grab the email address then perform a query on your database:

    Say you put the email address into the variable $eAddress,

    SELECT COUNT(*) FROM your_table WHERE email_address LIKE '$eAddress'

    This will do a case-insensitive search for the email string.

    If the count = 0 then enter it into the database, otherwise print your error message.


    [This message has been edited by TroutMask (edited February 23, 2000).]

Similar Threads

  1. The Soothingly Seamless Setup of Apache, SSL, MySQL, and PHP
    By guest in forum Development Articles
    Replies: 631
    Last Post: January 13th, 2004, 04:41 PM
  2. postgresql installation help
    By lightyears in forum PostgreSQL Help
    Replies: 3
    Last Post: November 2nd, 2003, 06:38 PM
  3. libtool-1.3.4_4 and bash settings
    By wacko_cracko in forum BSD Help
    Replies: 2
    Last Post: May 16th, 2003, 12:30 PM
  4. php installation issues - red hat linux
    By SiFactor in forum Linux Help
    Replies: 3
    Last Post: February 26th, 2003, 09:17 PM
  5. Problems installing KDE Decoration
    By Jestah in forum Linux Help
    Replies: 10
    Last Post: November 7th, 2002, 12:41 PM

IMN logo majestic logo threadwatch logo seochat tools logo