Everyone,
Need a little help. I have a problem that I have been banging my head on all weekend
and I am more than a little frustrated. Basically, I want to pull data from a
database and display it in the form of a table, with a row in the table for each row
from the database. What happens is each row from the database ends up as its own
seperate table. The current code portion is as follows:
Thanks,
Keith Murphy
#!/usr/bin/perl -w
#
#
use CGI qw(:all);
use DBI;
blah,blah,blah......
## fetch results and print
while ( my @row = $sth->fetchrow_array() ) {
($id,$first_name, $last_name, $phone_number, $street_address, $city, $state, $zip,
$email) = @row;
print center table ({-border=>5},
Tr({-valign=>CENTER},
[
td(['First Name', $first_name]),
td(['Last Name', $last_name]),
td(['Phone Number', $phone_number]),
td(['Street Address', $street_address]),
td(['City', $city]),
td(['State', $state]),
td(['Zip', $zip]),
td(['E-Mail', $email])
]
));
print p;
}