yea but... well that'd work just fine of course, but...
1) if i've given ANY output at all, it won't work
2) everytime the MySQL database is down, you get an error-page instaed of the real thing
what i'm really looking for is when a script hits a problem with the database (and only the database, all other errors should be programming errors), the script goes somewhere to the bottom and gives back an error.
Now you might ask, how could this be useful? Well, say i've got Index.php, and on it i have an include "counter.php"
well if the counter has a MySQL problem, the rest of the page won't load (unless you put the counter at the bottom but then you might as well make an invisible counter). There's also some stuff you can't include at the bottom due to placement problems...
The problem is, when counter.php hits a 'die()' function, index.php also dies, and the visitor gets shown the logo and the nav panel (wooptiedoo).
That will be useful for a few occasions though, so thanks anyway.