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

if name exists, do something

No comments posted yet

Your Answer:

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

mail() says sent but no email received
My code is quite simple:

Code: <?php
$to = "Ty44ler@yahoo.com";
$subje

Undefined index on my form
ok im getting Undefined index on this line.. print_r($_REQUEST['form']);

below is the full sc

Switch letters in message (basic cryptology)...
I am trying to switch letters around in a message for an application on my site (see here). The prob

How to Detect it is public_html or httpdocs?
How to check whether it is cPanel or Plesk?

If it found public_html perform <?php incl

EU VAT Package 2010
Does any one know whether SAP will be developing new reporting functionality due the new VAT rules t

Looping Problem
I've got a client that has a database with about 200 events at any given time. I'm trying to loop t

=> and <=
So I was digging through some code when I came across the <= operator. This is the first tim

difference between datetimes
($row['totime']-$row['fromtime'])/60

this is giving me 0

example of totime and fromtim

Date Question
I'm using the TIMESTAMP() function within mysql to set the date/time for certain events. However, ho

Automatic Webpage ??
I have a page www.mysite.com/test.php with a
<form>
<textarea name=&q

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