One thing I gotta teach you folks is -- one thing at a time!!!
I don't have this on my site. But I have copied down this URL, so the next person that asks will be sent here.
Assuming you have sendmail on your server, add the following to default.cfg:
Code:
# Full path to sendmail on your system
$mailprog = "|/usr/lib/sendmail -t -oeq";
# Your email address
$admin_email = 'you@yourserver.com';
Make the necessary changes to the lines to match the path to sendmail and your email address. Note that in the
$mailprog variable, you need to leave the
| at the beginning and the
-t -oeq at the end. Just edit the path to sendmail for your server.
Then, in html_add_success, right at the beginning of the subroutine, add
Code:
%rec = &get_record($in{$db_key});
open (MAIL, "$mailprog") or &cgierr("Can't start mail program");
print MAIL "To: $admin_email\n";
print MAIL "From: $admin_email\n";
print MAIL "Subject: Record Added\n\n";
print MAIL "-" x 75 . "\n\n";
print MAIL "
Put the text of the message you want in here.
You can have more than one line in one print statement by just using your 'Enter' key.
If you would like to include information about the record, use the
$rec{'fieldname'} variables, just like you use in html_record.";
close (MAIL);
I don't know how to prevent the same record details from being entered by two different people, unless there is one field that needs to be unique which you can use as the key field.
------------------
JPD