check if value exists


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

I have googled this for a while and I am getting lots of different results. Is there a standard method used for checking to see if a value exists in a database before inserting a value? I have a form, you type your name and push submit, it inserts the name into the database and then the name shows up in a list. Right now, it accepts the same values. I want to add a check to say

Did you know?Explore Trending and Topic pages for more stories like this.
if name exists, do something
No comments posted yet

Your Answer:

Login to answer
337 Like 35 Dislike
Previous forums Next forums
Other forums

Undefined variable when using $_SERVER['PHP_SELF']
Hi guyz, please suggest me something...
On first.php I have one input field NAME, and on posting

Changes to hosting company's server has affected web contact form
I started a thread a couple of months ago about the contact forms on my client's website. Basically

urldecode question
How would I format this line of code properly?

<?php echo urldecode($_GET['Title']); ?

PHP Captcha Error help - replace the "die" command
Hi All,

I am after a bit of help with a Captcha spam protection box.

The site gave me

Looking for help on using joining mysql tables and php....
Does anyone have any good links to references on how to pull mysql data, through joining tables and

Removing Title From database problem
Hi again ! i am having an issue with updating database. When i update any price of a title it remove

Join Query Help
Hi all,

I am having problems with the below code, which we shall call 'my first join query'!

fopen() security
As i understood the usage of fopen() for it to function correctly the Dir you write to has to be rw

Force download script not handling files with spaces properly
I have a regular old php force download script, uses this code:

Code: header("Cache-Cont

Checkbox info wont include in Mailto
Hey, im new to php.
Basically I have made a form to request which type of job(s) are needed, whic

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