Hello again. After a few days of frustrating Internet problems with my ISP and the new "Verizon" company, I've run into yet another problem with DBMan, although easily solved I suspect. Okay, here it goes:
I've set up the validate mod so that when the sub html_add_success runs, it sends an email to the administrator telling him that someone has added their stuff to the database. However, the email is never received and therefore probably never sent. Here's the code:
In default.cfg:
# Full path to sendmail on your system
$mailprog = "/var/qmail/bin/qmail-inject";
# Fieldname that contains the email address of the user
$db_email_field = 'Email';
# Your email address
$admin_email = 'WBK73G\@webknights.hypermart.net';
Note: I have tried taking the \ out of the $admin_email variable but to no avail.
In html.pl:
sub html_add_success {
# --------------------------------------------------------
# The page that is returned upon a successful addition to
# the database. You should use &get_record and &html_record
# to verify that the record was inserted properly and to make
# updating easier.
%rec=&get_record($in{$db_key});
open (MAIL, "$mailprog") or &cgierr("unable to open mail program");
print MAIL "To: $admin_email\n";
print MAIL "From: $admin_email\n";
print MAIL "Subject: New Staff Entry! - WebKnights Virtual Airlines\n\n";
print MAIL "$db_userid has added his/her self to the database. Here is his/her information:\n\n";
foreach $column (@db_cols) {
print MAIL "$column: $rec{$column}\n";
}
print MAIL "\n\n";
close MAIL;
&html_print_headers;
print qq|
<html>
<head>
<title>$html_title: New Member Added</title>
...
</body>
</html>
|;
}
My second problem is that when I am logged in as the admin, and I click the validate link in the footer, I get the search failed page with the error "<>No search terms specified." or something to that effect. I'm not sure what code I should post, if any, to help determine the problem. So, if you need code, just tell me what to post and I'll get it to you. That is, if my ISP and Verizon allow me to.
Thanks everyone,
Michael DeLong
I've set up the validate mod so that when the sub html_add_success runs, it sends an email to the administrator telling him that someone has added their stuff to the database. However, the email is never received and therefore probably never sent. Here's the code:
In default.cfg:
# Full path to sendmail on your system
$mailprog = "/var/qmail/bin/qmail-inject";
# Fieldname that contains the email address of the user
$db_email_field = 'Email';
# Your email address
$admin_email = 'WBK73G\@webknights.hypermart.net';
Note: I have tried taking the \ out of the $admin_email variable but to no avail.
In html.pl:
sub html_add_success {
# --------------------------------------------------------
# The page that is returned upon a successful addition to
# the database. You should use &get_record and &html_record
# to verify that the record was inserted properly and to make
# updating easier.
%rec=&get_record($in{$db_key});
open (MAIL, "$mailprog") or &cgierr("unable to open mail program");
print MAIL "To: $admin_email\n";
print MAIL "From: $admin_email\n";
print MAIL "Subject: New Staff Entry! - WebKnights Virtual Airlines\n\n";
print MAIL "$db_userid has added his/her self to the database. Here is his/her information:\n\n";
foreach $column (@db_cols) {
print MAIL "$column: $rec{$column}\n";
}
print MAIL "\n\n";
close MAIL;
&html_print_headers;
print qq|
<html>
<head>
<title>$html_title: New Member Added</title>
...
</body>
</html>
|;
}
My second problem is that when I am logged in as the admin, and I click the validate link in the footer, I get the search failed page with the error "<>No search terms specified." or something to that effect. I'm not sure what code I should post, if any, to help determine the problem. So, if you need code, just tell me what to post and I'll get it to you. That is, if my ISP and Verizon allow me to.
Thanks everyone,
Michael DeLong