10 my $templatename=$query->param('template');
11 my $startfrom=$query->param('startfrom');
12 ($startfrom) || ($startfrom=0);
13 ($templatename) || ($templatename='searchresults.tmpl');
19 my $template = HTML::Template->new(filename => $templatename, die_on_bad_params => 0);
22 my $sth=$dbh->prepare("select * from biblio where author like 's%' order by author limit $startfrom,20");
24 while (my $data=$sth->fetchrow_hashref){
30 $template->param(startfrom => $startfrom);
32 $template->param(nextstartfrom => $startfrom);
33 $template->param(template => $templatename);
34 $template->param(SEARCH_RESULTS => \@results);
36 print "Content-Type: text/html\n\n", $template->output;