I don't want to display errors in a screen, except that I want to save it in DB. I can't find any information about it. I think that it isn't difficult task, I just can't imagine how to orginize that...
Thank you a lot!
Use set_error_handler('myErrorFunction'); (See PHP Manual set_error_handler) define myErrorFunction with database inserts, turn off standard error reporting display with ini_get('display_errors', 0);
In addition to set_error_handler(), which is the right answer, you can use normal logical operators to detect things that you think might fail. For example, it's common practice to use things like:
$h = @mysql_connect(...) or die();
You can similarly react to other failures with your own function instead of die(). The @ in front of the function tells it to be "silent" on errors.
Of course, if you're storing errors in a db, what happens if you can't talk to the db? :)
mod_log_sql