In the code above, it is dying and not returning an error, all I'm getting is
"Error inserting debug info,"
Can't figure out why.
function DebugLog($_mod, $_msg) {
global $db_server;
global $db_user;
global $db_pwd;
global $db;
$_con2 = mysql_connect($db_server,$db_user,$db_pwd);
mysql_select_db($db,$_con2);
$sql = 'INSERT INTO `linv_debug_table` (line_id, proc_id, debug_msg, timestamp) VALUES (NULL, "'.$_mod.'", "'.$_msg.'", NULL)';
$result = mysql_query($sql,$_con2);
if(!$result) {
die('Error inserting debug info,'.mysql_error($_con2));
}
mysql_close($_con2);
}
using this to call it:
DebugLog("(".__LINE__.")", "Checking recaptcha answer");
Any ideas?
Yes, I can do an insert using the SQL produced with no problems.