I need to create a pick list that will search the database and return the records pertaining to the option value selected. It will work just like the "groups" pick list (generated by the Admin script and created with the HTML code). Can I create a similar routine to the "type=group" code that exists in the main script and just change the "group" assignments to the "name" assignments? I tried this with no success so far. Thanks, Roger Here's the original "type=group" code... elsif ($type eq 'group') { my($matches) = 0; my($i) = $pos; while (($matches < $numtolist) && ($i < $SIZE)) { $_=$LINES[$i]; my(%ITEM); ($ITEM{'itemid'}, $ITEM{'name'}, $ITEM{'price'}, $ITEM{'descrip'}, $ITEM{'image'}, $ITEM{'weight'}, $ITEM{'itemurl'}, $ITEM{'group'}) = split(/\|/,$_); my(@groups) = split(/,/,$ITEM{'group'}); my(%is_group); undef %is_group; for (@groups) { $is_group{$_} = 1 } if ($is_group{$FORM{'group'}}) { $matches++; &print_item(\%ITEM); } $i++; } print "\n"; if ($i < $SIZE) { print "Continue Search\n"; } } -- Roger (rkruppa@quikstart.com), February 07, 1999
Thanks,
Roger
Here's the original "type=group" code...
elsif ($type eq 'group') { my($matches) = 0; my($i) = $pos; while (($matches < $numtolist) && ($i < $SIZE)) { $_=$LINES[$i]; my(%ITEM); ($ITEM{'itemid'}, $ITEM{'name'}, $ITEM{'price'}, $ITEM{'descrip'}, $ITEM{'image'}, $ITEM{'weight'}, $ITEM{'itemurl'}, $ITEM{'group'}) = split(/\|/,$_); my(@groups) = split(/,/,$ITEM{'group'}); my(%is_group); undef %is_group; for (@groups) { $is_group{$_} = 1 } if ($is_group{$FORM{'group'}}) { $matches++; &print_item(\%ITEM); } $i++; } print "\n"; if ($i < $SIZE) { print "Continue Search\n"; } } -- Roger (rkruppa@quikstart.com), February 07, 1999