Delete duplicate email addresses

by achaa
4 replies
  • WEB DESIGN
  • |
Hello warriors

I'm quite new to php but I've been asked to write a script to remove duplicate email addresses.

I've got a prototype running here Delete Duplicate Email Addresses.

It doesn't look pretty - but as I said, it's a prototype.

I hope it's not out of line to as for some input on this?

I was just wondering if you think it's ok as it is? Or are there any improvements that you would think worthwhile?

Many thanks for any input

(Also if this is the wrong forum, sorry please move me.)
#addresses #delete #duplicate #email #online
  • Profile picture of the author Karen Barr
    Seems to work fine in my test.

    In order to avoid grammatical errors I'd change the wording on the results page slightly:

    "There were 4 emails in the original list
    There are 3 remaining, so 1 have been deleted."

    Change to:
    "Total email addresses submitted: 4
    Number of duplicates emails: 1
    Unique emails: 3"

    Add a little CSS to pretty it up and job's a good'un
    {{ DiscussionBoard.errors[7393023].message }}
  • Profile picture of the author achaa
    Thanks Karen, very kind of you to leave feedback.
    I will implement your ideas before I present the script.

    Moaita - thanks for the idea. As I'm learning php it was a good project for me today.
    I wrote a script that will extract emails from text.

    Extract Email Addresses from Text

    If anyone cares to try it out, I'd be grateful for feedback

    Thanks again.
    {{ DiscussionBoard.errors[7394829].message }}
  • Profile picture of the author gepisar
    Personally, id have a database table behind this and set an index on the email column to Unique - subsequent INSERT IGNORE will skip duplicates. Job done.
    {{ DiscussionBoard.errors[7394844].message }}
  • Profile picture of the author achaa
    Hi John, thanks for that. The original plan was that this be a quick'n'dirty list checker. (No need for dbase storage.)

    The second script is just a learning tool really - I definitely don't want to be saving reams of useless text

    But, suggestion noted for future reference - thanks.
    {{ DiscussionBoard.errors[7394915].message }}

Trending Topics