I need to do 2 things to this mod...
See attached text file of what I downloaded.
1 -- How do I get it to show just the second field, without the " " and
2 -- How do I limit the output to a specific district. I've added a variable to the .cfg file
that is called $db_district_name but I need help adding that to this code!
In my html.pl I have only:
<TR><TD ALIGN="Right" VALIGN="TOP"><$font_red>*Site:</FONT></TD>
<TD COLSPAN="3" VALIGN="TOP"> |; print &build_external_select_field ("Site", "$rec{'Site'}"); print qq|</TD></TR>
Do I need to replace that with the following?
print qq|<SELECT NAME="Test">|;
open (DB, "<$db_file_name2") or &cgierr("unable to open $db_file_name2. Reason: $!");
if ($db_use_flock) { flock(DB, 1); }
LINE: while (<DB> ) {
next if /^#/;
next if /^\s*$/;
$line = $_;
chomp ($line);
@fields = &split_decode ($line);
if (!(grep $_ eq $fields[0], @selectfields)) {
push (@categories, $fields[0]);
}
}
close DB;
foreach $category (@categories) {
print "<OPTION>$category";
}
print qq|</SELECT>|;
And if I do, how can I get this to show just the second field?
Thanks for the help!
Lynette
Hollister, Ca
See attached text file of what I downloaded.
1 -- How do I get it to show just the second field, without the " " and
2 -- How do I limit the output to a specific district. I've added a variable to the .cfg file
that is called $db_district_name but I need help adding that to this code!
In my html.pl I have only:
<TR><TD ALIGN="Right" VALIGN="TOP"><$font_red>*Site:</FONT></TD>
<TD COLSPAN="3" VALIGN="TOP"> |; print &build_external_select_field ("Site", "$rec{'Site'}"); print qq|</TD></TR>
Do I need to replace that with the following?
print qq|<SELECT NAME="Test">|;
open (DB, "<$db_file_name2") or &cgierr("unable to open $db_file_name2. Reason: $!");
if ($db_use_flock) { flock(DB, 1); }
LINE: while (<DB> ) {
next if /^#/;
next if /^\s*$/;
$line = $_;
chomp ($line);
@fields = &split_decode ($line);
if (!(grep $_ eq $fields[0], @selectfields)) {
push (@categories, $fields[0]);
}
}
close DB;
foreach $category (@categories) {
print "<OPTION>$category";
}
print qq|</SELECT>|;
And if I do, how can I get this to show just the second field?
Thanks for the help!
Lynette
Hollister, Ca

