Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Auto-populating dropdowns from mySQL 1

Status
Not open for further replies.

JohnLucania

Programmer
Oct 10, 2005
96
0
0
US
I have a form:

#! /usr/bin/perl

use warnings;
use strict;

use CGI ( ':standard' );

my $title = 'Sequence Search';
my $seq = param( 'Seq' );

print header,
start_html( $title ),
h1( $title ),<<"PrintTag",end_html;
<form name="SearchSeq" method="post" action="SearchSeqResult.cgi">
<p>
<select name="Seq1">
<option></option>
</select>
<input type="submit" name="Submit" value="Submit">
</p>
</form>
PrintTag

In the option (dropdown), I want to put the lists from the query statement:
select Seq1 from table1 order by Seq1;

There are more dropdowns to be added from the sql:

select Seq2 from table2 order by Seq2;
select Seq3 from table3 order by Seq3;
select Seq4 from table4 order by Seq4;

How do you auto-populate them?

jl
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top