estebanbilieri
New Member
I have a unique key set for a mysql database row so not to insert duplicate entries on a form submit. That works fine, but if there's a duplicate entry the page doesn't load. Instead the user receives the warning: \[code\]Duplicate entry ''' for key ''\[/code\]How do I go about turning that error off and loading the page even if there is a duplicate key, while still using the unique key on the row? I tried setting error report to off, but that didn't work.\[code\]mysql_query("INSERT INTO user(formemail,UserIP,Timestamp,LP) VALUES('$email','$userip',NOW(),'$lp') ") or die(mysql_error());\[/code\]