Howdie neighbor (check my host listing up top)
Well... do what I did and write an object to handle it. Also, defining the error messages is not a good idea, since you'll generate warnings by trying to redefine a constant (in the case of more than 1 error)
Here's a function that may be a guiding light:
function SEND_ERROR_REPORT() {
/*
Method is called on error
will generate email to admin
*/
if (is_array($GLOBALS['ERROR_LOG'])) {
// populate the email...
$Email_Body = SHOW_DOMAIN . " generated an error on " .
strftime('%c',time()) . "\n";
$Email_Body = "Page: " . PAGE_URI;
foreach ($GLOBALS['ERROR_LOG'] as $LOCAL=>$ERROR) {
$Email_Body .= "The " . $LOCAL . " error message was: " . $ERROR . "\n\n";
}
mail(ADMIN_EMAIL, 'Error Report', $Email_Body, 'From: ' . SHOW_DOMAIN .
'<'.ADMIN_EMAIL.'>' );
}
return;
}
...anyway, I'm looking for some decent OOP developers for some PHP projects and you're in the hood, so send me an email if you got some contracting time.