I'm having a problem with the info you gave me. When I manually add a link it adds the link, but doesn't send the email message and I get this error message:
CGI ERROR
==========================================
Error Message : fatal error: Undefined subroutine &main::html_add_email called at /usr/home/activewebmaster.com/cgi-bin/links/admin/db.pl line 55.
Script Location : admin.cgi
Perl Version : 5.006
###############################################
This is the part of db.pl it is talking about:
sub add_record {
# --------------------------------------------------------
# Adds a record to the database. First, validate_record is called
# to make sure the record is ok to add. If it is, then the record is
# encoded and added to the database and the user is sent to
# html_add_success, otherwise the user is sent to html_add_failure with
# an error message explaining why. The counter file is also updated to the
# next number.
my ($output, $status, $counter);
# First we validate the record to make sure the addition is ok.
$status = &validate_record (%in);
# We keep checking for the next available key, or until we've tried 50 times
# after which we give up.
while ($status eq "duplicate key error" and $db_key_track) {
return "duplicate key error" if ($counter++ > 50);
$in{$db_key}++;
$status = &validate_record (%in);
}
if ($status eq "ok") {
open (DB, ">>$db_file_name") or &cgierr("error in add_record. unable to open database: $db_file_name.\nReason: $!");
if ($db_use_flock) {
flock(DB, 2) or &cgierr("unable to get exclusive lock on $db_file_name.\nReason: $!");
}
print DB &join_encode(%in);
close DB; # automatically removes file lock
if ($db_key_track) {
open (ID, ">$db_id_file_name") or &cgierr("error in get_defaults. unable to open id file: $db_id_file_name.\nReason: $!");
if ($db_use_flock) {
flock(ID, 2) or &cgierr("unable to get exclusive lock on $db_id_file_name.\nReason: $!");
}
print ID $in{$db_key}; # update counter.
close ID; # automatically removes file lock
if ($in{'emailowner'} eq 'yes'){&html_add_email (%in);} <----------------######## This is what I was told to manually add.
}
&html_add_success;
}
else {
&html_add_failure($status);
}
}
################################
What could be the problem?
Thanks,
Eric J. Griffin
http://www.ActiveWebmaster.com - Webmaster Resources