How to Populate Drop-down list Dynamically.



Hi,
I am writing a Perl -CGI script and want to dynamically load the
drop-down list using the values retrieved from the database.
I am accepting the values retrieved from the database into the array
and then using it to populate the drop-down. But only the last value
gets populated in the dropdown.
Plz anybody help me out.
Code goes as follows:

my @PName=("A","B","C");

print<<print_tag;
<html><head><title>Hi</title></head><form method=POST action=" ">
Name &nbsp;
<select size="1" name="D1">

for($temp=0;$temp<$#PName;$temp++)
{
<option>$PName[$temp]</option>
}
</select>
</form></html>
print_tag

.



Relevant Pages

  • Re: Tables and inserting rows
    ... endorsements would populate for that 1 vehicle. ... Is it possible to rename the bookmark or do I have to use the other option ... Dim myDataBase As Database ... Dim myActiveRecord As Recordset ...
    (microsoft.public.word.vba.general)
  • Re: Tables and inserting rows
    ... I have the main template and then am inserting a document which has all the ... Dim myDataBase As Database ... Dim myActiveRecord As Recordset ... 'Add a row to the table and populate the cells in that row with the ...
    (microsoft.public.word.vba.general)
  • Re: Tables and inserting rows
    ... bookmark (rather than try and do something with autotext). ... Dim myDataBase As Database ... Dim myActiveRecord As Recordset ... 'Add a row to the table and populate the cells in that row with the ...
    (microsoft.public.word.vba.general)
  • Re: Tables and inserting rows
    ... Dim myDataBase As Database ... Dim myActiveRecord As Recordset ... 'Add a row to the table and populate the cells in that row with the data ... Set drow = dtable.Rows.Add ...
    (microsoft.public.word.vba.general)
  • Re: Tables and inserting rows
    ... The following code will populate a table with data from an Access database: ... Dim myDataBase As Database ... Dim myActiveRecord As Recordset ... Set drow = dtable.Rows.Add ...
    (microsoft.public.word.vba.general)