I would like to add $tjeneste_type to $row.
Can anybody tell me how to do that??
BR Soren
************The Code**************
#!/usr/local/bin/perl -wT
use strict;
use HTML::Template;
use CGI;
use DBI;
my $cgi = new CGI;
use constant TMPL_FILE => "$ENV{DOCUMENT_ROOT}/um/templates/status.tmp
+l";
my $tmpl = new HTML::Template( filename => TMPL_FILE );
my $search = $cgi->param("search");
my $tjenestested = $cgi->param("tjenestested");
my $dbh = DBI->connect("um","","","mysql") ||
die "Could not connect: $DBI::errstr\n";
my %attr = ( dbi_fetchall_arrayref_attr => {} );
my $row = $dbh->selectall_arrayref("select fornavn, efternavn, cpr, ad
+resse, zip, city, g_afsluttet, bemyndigelse_til from people where (id
+ like '%$search%')",\ %attr);
my $tjeneste_type;
if ($tjenestested =~ /^Konsulent/) {
$tjeneste_type = 'kon';
} else {
$tjeneste_type = 'um';
}
#ADD $tjeneste_type to $row???
$tmpl->param( row => $row );
print "Content-type: text/html\n\n",
$tmpl->output;
$dbh->disconnect;
Edit - Petruchio Thu Oct 18 10:34:45 UTC 2001: Added code tags,
cleaned up markup.