I want to store my the errors logs my PHP creates into a MySQL table, but nothing is being inserted into it.
the code I'm using for the error log is..
function myHandler($code, $msg, $file, $line)
{
echo "An error occurred while processing your request. Please visit our site and try again.";
// log error to file, with context
$logData = date("d-M-Y h:i:s", mktime()) . ", $code, $msg, $line, $file\n";
die("Error");
}
with the lines
$insert = "INSERT INTO error_logs (error_message)"."VALUES ('$logData')";
mysql_query($insert)or die();
to insert the log into the error_message column in the error_logs table which is set to VARCHAR with 250 character cap
I assumed it'd just set a something in there, but apparently I'm way off the mark.