Using a UNIQUE key is probably the best way to handle this.
That way, the Database server itself will prevent duplicate rows from being created, so your PHP application won't have to.
Although, you will have to make sure your code can detect and handle the error.
If you already have your table, you could add the UNIQUE key by using the ALTER TABLE syntax.
Like (assuming MySQL, but would probably work for others to)
-
ALTER TABLE tblName ADD UNIQUE (theColumn);
-
/* Or if you need multiple columns */
-
ALTER TABLE tblName ADD UNIQUE (col1, col2, /*...*/, colN);
-
And as always, remember to test this before using it on any data you can't afford to lose.