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

Can I use a loop
Hi buddies!

Once again with my doubts here.

Right now I am using this sql stat

passthru() help
Hi everyone,
I'm new to the forum and to PHP. I have some pretty good experience writing shell sc

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

Page doesn't expand for content
Hi. I've been testing a query I made. It's here http://lapr1.6te.net/inquerito.php
The page doesn

Wierd echo error?
Hi, i got the most wierd php error ever and i don't know why..
Code: echo "<t

WELCOME SCREEN
first of all let me tell you what does my script do,

it´s a very simple query to show a e

Procedural to OOP
John Kleijn said that to avoid writing "crappy code", we should learn OOP and common OO pr

Time-based image rotation script
I'm trying to write a PHP script that rotates an image based on what time of day it is. I want the

Socket Server Response Headers
Earlier I had a post about my Socket Server, I wasn't able to get it to connect, now I can

I

php libs/ browsercap.in
ok i have a host that refuses to stay current. they control my php settings and libs. is there a way

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