First off, I'm not sure why you have the
%rec = &get_record($in{$db_key});
in sub modify_record. All of the values of the fields will be in the %in hash when the subroutine is called. In your mailer subroutine, just use $in{'Fieldname'}.
Second, there is no need to have a "Change" field in your database. You can add the checkbox to the form without adding the field. It, too, would be in the %in hash. So you would use
I'm not sure what you need to change in sub validate_record, or if you need to change anything at all.
When you run your script, do you get the modify success page, even though the email isn't sent?
------------------
JPD
%rec = &get_record($in{$db_key});
in sub modify_record. All of the values of the fields will be in the %in hash when the subroutine is called. In your mailer subroutine, just use $in{'Fieldname'}.
Second, there is no need to have a "Change" field in your database. You can add the checkbox to the form without adding the field. It, too, would be in the %in hash. So you would use
Code:
if (($in{'Change'}) && ($in{'Email'})) {I'm not sure what you need to change in sub validate_record, or if you need to change anything at all.
When you run your script, do you get the modify success page, even though the email isn't sent?
------------------
JPD