Perl-Sensitive Sunglasses | |
PerlMonks |
Re: Drop Down Selection From Databaseby cadfael (Friar) |
on Jan 26, 2001 at 18:26 UTC ( [id://54544]=note: print w/replies, xml ) | Need Help?? |
One thing to consider is whether you want this to be a controlled
vocabulary. i.e. Are there a limited number of choices that
you want people to have? If this is the case, then they can
be hard coded into a pull-down form.
If, on the other hand, you want to generate the current list of comapny names reflecting recent additions, then you would need to do something like this: (I put in an ID_no assuming that this is a relational database and you are using surrogate keys. You may need them further along in the query form) Then you would take the array returned by the SELECT and use it to populate the drop-down list. -----
In Section
Seekers of Perl Wisdom
|
|