Trap error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux