Re: [htmltmpl] SSI and HTML::Template

2002-09-22 Thread David Kaufman
Kenny Smith <[EMAIL PROTECTED]> wrote: > > [EMAIL PROTECTED] wrote: > > What I really meant was convert the SSI include tag in > > *run-time* to an HTML include and process it as such. I > > hope this better explains it. > > Hi Roy, > > Ah, I understand what you need. Checkout the documentation on

Re: [htmltmpl] HTML-Template and DBI

2002-09-22 Thread Doc
template is a simple: ID - Original Message - From: "Ben Ausden" <[EMAIL PROTECTED]> To: "Doc" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Sunday, September 22, 2002 10:58 AM Subject: RE: [htmltmpl] HTML-Template and DBI Could you be more specific? Are you seeing any error messa

Re: [htmltmpl] HTML-Template and DBI

2002-09-22 Thread Doc
Ive got the header. When I add print the $data before it addred to @rows, I get HASH(0x825cbfc) . - Original Message - From: "Ben Ausden" <[EMAIL PROTECTED]> To: "Doc" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Sunday, September 22, 2002 10:58 AM Subject: RE: [htmltmpl] HTML-Templ

RE: [htmltmpl] HTML-Template and DBI

2002-09-22 Thread Ben Ausden
Could you be more specific? Are you seeing any error messages? Are you running the script from the command line or via CGI? If the output of your script is destined for a browser, you need to print the appropriate headers... If the script is running in a standard CGI environment, something li

Re: [htmltmpl] HTML-Template and DBI

2002-09-22 Thread Doc
And like i said, it does not work. - Original Message - try this: my @rows = (); while ( my $data = $sth->fetchrow_hashref() ) { push @rows, $data; } $template->param(ROWS => \@rows); regards, Ben -Original Message- From: Doc [mailto:[EMAIL PROTECTED]] Sent: 22 Septemb

Re: [htmltmpl] HTML-Template and DBI

2002-09-22 Thread Doc
my $DBH = DBI->connect($db_config{"dsn"}, $db_config{"username"}, $db_config{"password"}, { PrintError => 0, AutoCommit => 1 }) or die "Could not connect: $DBI::errstr"; my $sth = $DBH->prepare(' '); $sth->execute(); my $template = HTML::Template->new(filename => 'template.html'); my @rows =

RE: [htmltmpl] HTML-Template and DBI

2002-09-22 Thread Ben Ausden
try this: my @rows = (); while ( my $data = $sth->fetchrow_hashref() ) { push @rows, $data; } $template->param(ROWS => \@rows); regards, Ben -Original Message- From: Doc [mailto:[EMAIL PROTECTED]] Sent: 22 September 2002 15:10 To: [EMAIL PROTECTED] Subject: [htmltmpl] HTML-Template

[htmltmpl] HTML-Template and DBI

2002-09-22 Thread Doc
I have attempted to make HTML-Template to work with DBI and fetching database results using      Perlmonk code:     push @{$rows}, $_ while $_ = $sth->fetchrow_hashref(); my $template = HTML::Template->new(filename => 'songs.tmpl');$template->param(ROWS => $rows); print $template->output();