Page 1 of 1

PHP and MySQL: I don't want the error!

Posted: Sat Jul 22, 2006 10:29 am
by Locust
I've looked everywhere and can't find anything. Not even sure if anyone will be able to answer this.

Basically I don't want error messages such as

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: NO) in <location> on line #

I have my own checks and don't want such a message messing my page up :P

Any help is appreciated.

Posted: Sat Jul 22, 2006 10:34 am
by feyd
The error "control" operator may be of use, but I personally wouldn't use it: @

I normally use the error handling controls: set_error_handler() and set_exception_handler()

Posted: Sat Jul 22, 2006 10:46 am
by Locust
Thanks for the fast response. Looks perfect :D