Hello - I am trying to dynamically generate an HTML page that will list the data from a table. For example, announcements posted to an internal system which are duplicated on the web for users who wish to view them. Naturally I want this web page to be reflective of what is actually 'announced' in the source system each time the page is accessed.
I have tinkered with TMPL_LOOPs all day, and while they seem to have been the answer I can't get it work. Here is the code that does work, sans any TMPL_LOOP stuff. My question is how to take what I have and incorporate TMPL_LOOP (feel free to presume I understand the HTML template side of the equation). TIA - N. sub Announce { print PERLLOG "$now: running Announce...\n"; my $sth = $dbh->prepare( " SELECT posted_date, text FROM cnote " ); $sth->execute(); # 'rd' prefix means 'returned data' $sth->bind_col( 1, \$rd_pdate); $sth->bind_col( 2, \$rd_text); # put query output into an array my @stash; while ( $array_ref = $sth->fetchrow_arrayref ) { push @stash, [ @$array_ref ]; } $string = time2str($rd_pdate); return; } exit; sub Make_Page { print PERLLOG "$now: Announce : $rd_pdate, $rd_text\n"; # open the HTML template my $template = HTML::Template->new(filename=>'e:/inetpub/template.htm'); # generate output back to the browser $template->param( DATE=>$string, TEXT=>$rd_text, ); print $template->output; return; } exit; M. Nicole Johnson CACP - Advanced Help Desk 713-420-1096 work 832-724-3215 cell 928-441-2504 efax mailto:[EMAIL PROTECTED] ****************************************************************** This email and any files transmitted with it from the ElPaso Corporation are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the sender. ****************************************************************** _______________________________________________ Perl-Win32-Web mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs