Hello,
I have some duplicate checking going on in my script, but right now it only checks 2 fields.
Can someone help me with the code it'll take to check for duplicates in 2 fileds?
Also, I want to add some code that'll check for duplicates no matter what the CHARACTER CASE. For instnace, if a TITLE called "Pee Wee" is in the DB, I want the user to get an error if he enters "PEE WEE", "Pee WEE", or "Pee Wee", or any other case insestive title with the same name.
Here's my code as of now. Right now it's checking for duplicates in the TITLE field, but I want my user to get the error if the TITLE or the LINK field have been entered:
$query = "SELECT * FROM Dvds WHERE title='$title'";
$result = mysql_query($query);
if (mysql_num_rows($result) != 0) {
echo "<div align='center'><br><br><h1><font color='#FFFFFF'>ERROR: </font><font color='#FF0000'>$title</font><font color='#FFFFFF'> is already in the database!";
die;
}
else {
Please help! Thanks!