in reply to Re: Re: Drop Down Selection From Database
in thread Drop Down Selection From Database

it erased my formating... the first time.. something like this: not completely correct i think...

use CGI;
use DBI;
use strict;

my $q = new CGI;
print $q->header();

print "<html><form><select>\n";

my $dbh = DBI->connect(&DSN, &USER, &PASS);

my $sth  = $dbh->prepare("SELECT memberID, membername FROM members");

$sth->execute();

while( my ($memberID, $membername) = $sth->fetchrow_array() ) {
   print "<option value="$memberID">$membername \n";
}


  • Comment on Re: Re: Re: Drop Down Selection From Database