Trap error
| From: | Mário Gamito | Date: | Tue, 24 Aug 2004 14:39:03 +0000 |
| Subject: | Trap error | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-35875@lists.php.net to get a copy of this message | ||
Hi,
I have this form to submit a string to a postgreSQL table.
This table has UNIQUE property, so if someone tries to insert the same value more than once, PHP says:
"Warning: pg_exec(): Query failed: ERROR: duplicate key violates unique constraint "urls_negados_url_negado_key" . in /var/www/html/knet/boffice/insert_url_negado.php on line 4"
How can i redirect to a page informing the user of the fact, instead of this ugly warning ?
Any help would be appreciated.
Warm Regards,
Mário Gamito