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

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
Locust
Forum Commoner
Posts: 31
Joined: Sat Jul 22, 2006 10:26 am

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

Post 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.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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()
Locust
Forum Commoner
Posts: 31
Joined: Sat Jul 22, 2006 10:26 am

Post by Locust »

Thanks for the fast response. Looks perfect :D
Post Reply