Gossamer Forum
Home : Products : DBMan : Customization :

modify record notification

Quote Reply
modify record notification
Hi all,
is there any way I can do the following:

if a user puts are record in, but made a mistake and wishes to modify it, the modified record is saved as a new record with some kind of mark on the original showing that a new record exists (only the admin person see this)

CAn anyone help me do this?

Thanks

Siceman


Quote Reply
Re: modify record notification In reply to
You are not allowing people to modify their own records?
If you did allow this then they could just fix the mistake within their record by clicking on modify.

I'm trying to understand why you would want to create a new record with duplicate information? Is it because you want to be notified when changes are made to the records?

If so, you could have an email sent to you when a record is modified. You could add this snippet of code to your
sub html_modify_success

### send email when record is modified ####
%rec = &get_record($in{$db_key});
&html_record(%rec);

open (MAIL, "$mailprog") or &cgierr("Can't open sendmail!\n");
print MAIL "To: $admin_email\n";
print MAIL "From: $admin_email\n";
print MAIL "Subject: Record Modified $html_title\n\n";
print MAIL "-" x 75 . "\n\n";
print MAIL "An entry was modified in $html_title\n";
print MAIL "$rec{$db_key}\n\n";
print MAIL "$rec{'Name'} $rec{'Email'}\n\n";
print MAIL "$rec{'Comments'}";
print MAIL "\n";
print MAIL "\n";
close (MAIL);
########## end of send modification email #######

Of course you would change the variables in the example above. You would also need to define:

$admin_email
$mailprog = "|/var/qmail/bin/qmail-inject -t -oeq";

within your .cfg file.

You can find more information in the FAQ noted below under "Email" and also "Admin / Setup"

Hope this helps

Unoffical DBMan FAQ
http://webmagic.hypermart.net/dbman/
Quote Reply
Re: modify record notification In reply to
basically Id like the ability to see the original record, as well as the corrected one.


Quote Reply
Re: modify record notification In reply to
I think someone in the past just used the solution of having an email sent also when the record was added so they would have a copy of the original post.

You might want to check the FAQ below under the section "Files / Records" and see if you can find a related question and possible solution for what you want to do.

Sorry I could not be of more help

Unoffical DBMan FAQ
http://webmagic.hypermart.net/dbman/