I\'ve looked for similar questions with no success.
I have this piece of code:
form1.php
$query = \"INSERT INTO table1 \";
Create a UNIQUE key on the fields you care about, and detect the integrity error after the fact.