Hi,
Ah, think I understand you now. I'd use something like this; (you'll probably wanna use Full_Name though, and not Name);
my $back = qq|<select name="catid">|;
my $tbl = $DB->table('Category');
$tbl->select_options('ORDER BY Full_Name DESC');
my $sth = $tbl->select();
while (my $hit = $sth->fetchrow_hashref) {
$back .= qq|<option value="$hit->{ID}">$hit->{Full_Name}</option>|;
}
$back .= q|</select>|;
}
..and call in search.html with;
<%global_name%>
Assuming I'm understanding what your asking for :D
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Ah, think I understand you now. I'd use something like this; (you'll probably wanna use Full_Name though, and not Name);
Code:
sub { my $back = qq|<select name="catid">|;
my $tbl = $DB->table('Category');
$tbl->select_options('ORDER BY Full_Name DESC');
my $sth = $tbl->select();
while (my $hit = $sth->fetchrow_hashref) {
$back .= qq|<option value="$hit->{ID}">$hit->{Full_Name}</option>|;
}
$back .= q|</select>|;
}
..and call in search.html with;
<%global_name%>
Assuming I'm understanding what your asking for :D
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!