I answered my own question. What works is to have the computers loaded into an array and then do this:
print $query->popup_menu(-name=>'computer', -value=>\@list, -default=>'$default', ); Thanks for the help. Stanley G. Martin Sprint - ISS Enterprise App/Decision Support Services [EMAIL PROTECTED] -----Original Message----- From: giglmon [mailto:[EMAIL PROTECTED]] Sent: Friday, July 05, 2002 3:21 PM To: Stanley.G.Martin; perl-win32-web Subject: Re: CGI.pm Question Perhaps something like this: while ($row = $sth->fetchrow_array) { print "<OPTION VALUE='$row'>$row"; } untested -----Original Message----- From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Date: Fri Jul 05 13:11:41 PDT 2002 Subject: CGI.pm Question >Hope this is the right list. > >I have a list that is generated from a database and I want to create >this list in a CGI script and have the default selection be determined >by another option from that database. > >For example: > > possible types of computers is a list > a user has one of those types > I want to show the information for that user with the type of computer >they have pre-selected in the list. > >I can do this the long way by using Perl, but I was wandering if using >the CGI.pm functions this could be done. > >This doesn't work > >print $query->popup_menu(-name=>'computer', > -value=>$sel_list, > -default=>'$default, > ); > >Any ideas??? > >Stanley G. Martin >Sprint - ISS Enterprise App/Decision Support Services > >[EMAIL PROTECTED] > ___________________________________________________ GO.com Mail Get Your Free, Private E-mail at http://mail.go.com _______________________________________________ Perl-Win32-Web mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs _______________________________________________ Perl-Win32-Web mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs