Hello Andy,
Thank you for this very good Global.
I have a question.
I place Tag on the category page (category.html).
It would be possible to select the category in the list.
Sample :
<select name="select">
<option value="1">category1</option>
<option value="2" selected>category2</option>
<option value="3">category3</option>
</select>
For =======================
sub {
my $show_count = $_[0];
my $category;
my $db = $DB->table('Category') || return $GT::SQL::error;
$db->select_options('ORDER BY Full_Name') || return $GT::SQL::error;
my $sth = $db->select( ['ID','Full_Name','Number_of_Links'] ) || return $GT::SQL::error;
my $back;
while (my ($id,$full_name,$numberoflinks) = $sth->fetchrow_array) {
my $full_name2;
my @cut = split /\//, $full_name;
for (my $i=0; $i < $#cut; $i++) {
$full_name2 .= " ";
}
$full_name2 .= $cut[$#cut];
if ($show_count) {
$full_name2 .= " ($numberoflinks)";
}
$back .= "<option value=\"$id\">$full_name2</option>";
}
my $send_back = qq|<select size="1" name="catid"><option value="">------</option>$back</select>|;
return $send_back;
}
========================================
Thank you for your assistance.
Mick
Thank you for this very good Global.
I have a question.
I place Tag on the category page (category.html).
It would be possible to select the category in the list.
Sample :
<select name="select">
<option value="1">category1</option>
<option value="2" selected>category2</option>
<option value="3">category3</option>
</select>
For =======================
sub {
my $show_count = $_[0];
my $category;
my $db = $DB->table('Category') || return $GT::SQL::error;
$db->select_options('ORDER BY Full_Name') || return $GT::SQL::error;
my $sth = $db->select( ['ID','Full_Name','Number_of_Links'] ) || return $GT::SQL::error;
my $back;
while (my ($id,$full_name,$numberoflinks) = $sth->fetchrow_array) {
my $full_name2;
my @cut = split /\//, $full_name;
for (my $i=0; $i < $#cut; $i++) {
$full_name2 .= " ";
}
$full_name2 .= $cut[$#cut];
if ($show_count) {
$full_name2 .= " ($numberoflinks)";
}
$back .= "<option value=\"$id\">$full_name2</option>";
}
my $send_back = qq|<select size="1" name="catid"><option value="">------</option>$back</select>|;
return $send_back;
}
========================================
Thank you for your assistance.
Mick