> > my $news = (sql query code goes here...);
> >
> > my $template = HTML::Template->new(
> >   filename => "$Template_Dir/$tmpl_file",
> > die_on_bad_params => 0,
> > );

Sorry, guess I forgot to change $Template_Dir/$tmpl_file to
"your_html_file.tmpl".

In your table cell, put exactly this:

<TMPL_VAR NAME="NEWS">

then direct your users to a CGI script of the sort of what I mentioned before.
I'll rewrite it now that I'm not hastly cut & pasting..

#!/usr/bin/perl
use strict;

use HTML::Template;
use DBI;

$dbh = DBI->new("DBI:mysql:news;host=localhost",
  "db_username",
  "db_password",
  { RaiseErrors => 1, AutoCommit =>1}
);

my $sth = $dbh->prepare("SELECT * FROM NEWS WHERE DATE=20032906");
my $news = $sth->execute;

my $template = HTML::Template->new(filename => "your_html_file.tmpl");
$template->param(NEWS => $news)
return $template->output();

Users will have to browse to the cgi script of course....

Dennis


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to