Check before inserting in DB ???


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

This is my code
---------------
if ( $_POST ['Submit'])
{{
Did you know?Explore Trending and Topic pages for more stories like this.
$username = $_POST ['usernm'];
$userpassword = $_POST ['userpw'];
}
/*insert data from the form into the db table*/

$querypost = mysql_query ("INSERT INTO users (usernm, userpw) VALUES ('$username','$userpassword')");
}
?>

How do I check before inserting whether that username and password is already inserted. I have an id assigned to every entry.
No comments posted yet

Your Answer:

Login to answer
158 Like 46 Dislike
Previous forums Next forums
Other forums

PHP/Database issue
My friend is helping me make a database where you go to a certain webpage of my site and the page wi

problem with php mysql query
Hi guy's...

I'm totally lost here..because don't have any idea how to make a query for grab r

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

URL Rewrite issue
Im created a series of Rewrites and on page checks to make sure the correct url is being called. But

mysql timestamp manipulation
How could I use a timestamp (e.g 2009-10-30 13:20:35 ), and with php find out if it is:

from

HOW to get the bind variables list.
I've the following problem : I've some SQL queries stored in my DB as VARCHAR2 values.
I need t

Session variable help
I'm having a very troubling issue. Maybe I'm just looking over something but I have looked at the co

Ignore html and bbcode?
I've created a function to limit the amount of text according to the amount of words.

However

BB_Code error
I'm having a problem with a custom built function and keep getting this error:


Warning: M

chat
hello i'm amir i need a chat source code in asp.net 2.0 without Ajax. anybody can help me?

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