I am a newbie and trying to develop a PHP Mysql program that requires a unique name to be entered in a table. How do I test for errors? I have looked all thru the mysql manual and can't find an error message or number for this. Help please! Is there a standard error checking routine that most data entry situations? Thanks.
If you define a column in MySQL as required to be unique, you can check with PHP when you do an insert if it was successful.
Check the result from a mysql_query call and if it is FALSE, it violated the uniqueness and failed...