Lee,
It helps how you explain what I want to do -- which I think is exactly on target.
The problem is how do I encorporate? I don't think yr talking about a stand-alone script. Guessin' I need to encorporate something like in have in sub html_add_success, like the below?
Code:
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("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 "The record on a $rec{'First Name (Nickname) & Spouses Name'} $rec{'Last Name in School'}/$rec{'Married Name'} $rec{'YearGrad'}
has just been updated. Modify or Upload as necessary.";
close (MAIL);
&html_print_headers;
print qq|
<html>
<head>
<title>$html_title: Record Added.</title>
</head>
<body background="http://home.flash.net/~murgnam/S2.JPG">
<center>
<table border=1 bgcolor="#FFFFFF" cellpadding=5 cellspacing=3 width=500 align=center valign=top>
<tr><td bgcolor="navy">
<FONT FACE="MS Sans Serif, arial,helvetica" size=1 COLOR="#FFFFFF">
<b>$html_title: Record Added</b>
</td></tr>
<tr><td>
<p><center><$font_title><b>
Record Added
</b></font></center><br>
<$font><P>The following record was successfully added to the database:</FONT>
|;
&html_record(%rec);
Below is my feable attempt ... but an attempt nonetheless, :-0
Code:
sub html_listserve {
# --------------------------------------------------------
# The page that is returned upon a successful subscription to
# listserve. You should use &get_record and &html_record
# to verify that the record was inserted properly and to make
# updating easier.
%rec = &get_record($rec{'Receive Email'} eq 'Yes');
open (MAIL, "$mailprog") or &cgierr("Can't open sendmail!\n");
print MAIL "To: majordomo\@majordomo.flash.net\n";
print MAIL "From: $rec{'Email Address'}\n";
print MAIL "Subject: subscribe\n\n";
print MAIL "subscribe database-news-you-can-use\n";
print MAIL "-" x 75 . "\n\n";
close (MAIL);
&html_record(%rec);
}
OK, that took me 30 minutes to "attempt" to write. Note I changed to "Email Address" as that's how it looks in default.cfg. Also left in the "print MAIL "-" x 75 . "\n\n";". Don't know if that 2nd part is important, but what the hey. Also, I'm not sure whether I should or shoulda put in the %rec thing, but I'm hoping that's what you were talking about earlier.
OK, I'm sure I prob butchered the above, but I tried. Other question, with the above I'm assumming I need to put something in db.cgi to call the sub html_listerve?
If I can wicker the above, that's great! But, I'm seeing it as only working for those who subscribe from this point on ... what about the 250 folks I already have, who've indicated Yes in the Receive Email area? How do I pull them in?
So far as the unsubscribe part, don't think I need that -- as I'm only concerned and wanting to send my database news you can use Newsletter thingy to the folks that indicate Yes. So long, as the folks indicating No, don't get their email address pulled in to the listserve, all is well.
JR
[This message has been edited by joebagodonuts (edited April 12, 2000).]