Hello,
Right now I have a script that includes a form.
Basically, you enter info into the FORM in 3 fileds then submit it. This info then put into my MySQL DB.
Now, I have a little error checking in there, that will check for DUPLICATES in one filed:
$query = "SELECT * FROM Dvds WHERE title='$title'";
$result = mysql_query($query);
if (mysql_num_rows($result) != 0) {
echo "$title is already in the database!";
die;
}
Now, is there a way to check for DUPLICATES in 2 of the fields that the user is inputting?
For instance, say I have to fileds:
TITLE:
STUFF:
Now, say the user enters in a field that EITHER TITLE OR STUFF that is already in the DB. That's when I want thm to get the error.
Get it? Should be easy...I just don't know how to pull it off.
Thanks in advance.