Hello Daniel,
Thursday, July 26, 2001, Daniel Falkenberg <[EMAIL PROTECTED]> wrote:
DF> I would like the following HTML/PERL sub. to go forth and grab all the users
DF> from my database and place them into a drop down box. Problem is I am
DF> getting information allover the page everywhere? Could some give me some
DF> hints on how to grab information from a database and display this
DF> information in a drop downbox correctly?
DF> sub add_job{
DF> my $sth = $dbh ->prepare( qq{ SELECT username FROM
DF> db_users
DF> } ) || die $dbh->errstr;
you mean something like this?
$sth->execute || die $dbh->errstr;
print '<select name="users">';
my $entries;
while ($entries = $sth->fetchrow_hashref){
my $name = $entries->{username};
print "<option value=\"$name\">$name</option>";
}
print "</select>";
}
Best wishes,
Maxim mailto:[EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]