In the former version I've edited in the contacten.php hooks file to send an email after each inserted record.
I've read in this forum that something migth have changed, however adjusting the given code to my table (contacten) results in a white screen.
Do I miss something? (The only changes where table name and e-mail.
I've inserted the complete function
Code: Select all
function contacten_insert(){
// mm: save record change data
$recID=mysql_insert_id();
sql("insert into membership_userrecords set tableName='contacten', pkValue='$recID',
memberID=' ".getLoggedMemberID()."', dateAdded=' ".time()."', dateUpdated='".time()." ',
groupID=' ".getLoggedGroupID().".", $eo);
@mail(
/*comma-separated listed of recipients */
"[email protected]",
/*message subject */
"Database change to the Contacten table notification",
/*message contents */
"A new record has been added by: ".getLoggedMemberID().
".\n\n".
"To view it, please go to: \n"
"http://oursite.com/appginidatabasefilefolder/routes_view.php?SelectedID=$redID",
/*sender email */
"From: [email protected]"
);
return (get_magic_quotes_gpc() ? stripslashes($recID) : $recID);
}
function contacten_before_insert(&$data, $memberInfo, &$args){
/* verhoog lidaatschapsnummer automatisch met 1 */
/* $data['LidNR'] = 1 + (1 - $data['LidNR']; */
return TRUE;
}