If a record matches an existing record do nothing


Posted on 16th Feb 2014 07:03 pm by admin

So I don't know if I should put this here or in mysql, but what my script is for is for people to add their emails to our mailing list. Pretty simple, I got that working. But what I want it do now is that if somebody puts their email in and their email is already added to our database then it doesn't do anything. but if their email isn't in our database then it will add it.

Did you know?Explore Trending and Topic pages for more stories like this.
So basically stop duplicate records. Is there any way to do this php? I'm sure there is, its just not coming to me.
No comments posted yet

Your Answer:

Login to answer
232 Like 20 Dislike
Previous forums Next forums
Other forums

Referential Integrity problem when inserting into 2 tables at same time
Hello Everyone,

Im relativity new to PHP and MySQL and i have come up against a problem. i h

Delete all from a table
I can not get the following code to work. If I run the sql statement in the db it will delete all t

login from external site
Hi my new experience begins, Now what i am trying to do is i make three pages, login.php logout.php

Uploading/Downloading files stored in MySQL database
Hey all,

This problem just came up in my website and I'm having a hard time figuring out what

Output Full URL of Current Page
Let's say I am currently viewing a dynamic page:

http://www.mydomain.com/directory/index.php

Problem displaying "scraped" XML data
I'm basicly having trouble displaying XML data scraped from an URL using cURL.

What the code

Compare user input to flat file data
Help...Am a complete newbie to programming so my code is prolly quite long. Am trying to verify a us

Save User Inputs while javascript reloading!
hi..
i have written a PHP code in which i reload the page when user selects a value in dropdown..

RTF fomatting to email content
Im trying to sen an email with content is picked up from a rtf-file (file_get_contents('*.rtf'). Mai

rdns with php
I am trying to build a script that will show all of the different domains that are hosted on the sam

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash