Is the ID added after the operation?
if I have the code run unblocked it fails to add a new record:
//—-doesn’t work-I think because of the missing ID??
//$e[“on_insert”] = array(“add_rec”, null, true);
//$g->set_events($e);
function on_insert($data)// —
{
$headers = ‘Content-Type: text/html; charset=utf-8’ . “\r\n” . ‘From: [email protected]’;
$message = $data;
// Send
$message = wordwrap($message,70) . “\r\n”;
$success = mail(‘[email protected]’, ‘Nová porucha’, $message, $headers);
if (!$success) {
$errorMessage = error_get_last()[‘message’];
}
print_r($message);
}
Your Answer