Been looking at this thread along with
www.gossamer-threads.com/scripts/forum/resources/Forum12/HTML/000853.html ... Trying to mirror what donm was asking. I created sub html_Year_Grad
Code:
sub html_Year_Grad {
# --------------------------------------------------------
# Browse Top 5 Graduating Classes
open (DB, "<$db_file_name") or &cgierr("unable to open $db_file_name. Reason: $!");
@lines = <DB>;
close DB;
$fieldnum = 2;
foreach $line (@lines) {
@data = &split_decode($line);
++$count{$data[$fieldnum]};
}
$i = 1;
foreach $gyear (sort {$count{$b} <=> $count{$a} } keys %count) {
if ($i>5) { last; }
print "$gyear: ($count{$gyear})<BR>";
++$i;
}
... which I "think" is correct. But my "link" to the above info is out 'o whack I think. I've got
Code:
print qq!| <a href="$db_script_link_url&Year_Grad=1&sb=2&so=descend">Top 5 Classes</a> ! if ($per_view);
in sub html_footer and
Code:
elsif ($in{'Year_Grad'}) { if ($per_view) { &html_Year_Grad; } else { &html_unauth; } }
in db.cgi.
Any code hackers tell me what I'm missing? Please, <g>
JR
------------------
Joebagodonuts, JR or Anita
home.flash.net/~murgnam/ [This message has been edited by joebagodonuts (edited March 31, 2000).]