Code: Select all
function tablename_before_update(&$data, $memberInfo, &$args){
// get the creation date of the record
$creationDate=sqlValue("select dateAdded from membership_userrecords
where tableName='tablename' and pkValue='{$data['selectedID']}'");
if the record is older than 30 days, deny changes
if($creationDate < strtotime('30 days ago')) return FALSE;
return TRUE;
}
The changes have been saved successfully.
How can we change this message to say CHANGES NOT SAVED in this case?