Show evrything in a single table

Hi
I am reading a dbf file through perl and i want to  show all records in  a single table....
for this my cgi is like this...
while(!$database->eof)
{
print <<endresult;
<TABLE BORDER WIDTH="100%"><TR>
<TD><B><FONT COLOR="#000099"><FONT SIZE=-1>$fields[11] </FONT></FONT></TD>
<TD><B><FONT COLOR="#000099"><FONT SIZE=-1>$fields[5] </FONT></FONT></TD>
<TD><B><FONT COLOR="#000099"><FONT SIZE=-1>$fields[3] </FONT></FONT></TD>
<TD><B><FONT COLOR="#000099"><FONT SIZE=-1>$fields[15] </FONT></FONT></TD>
<TD><B><FONT COLOR="#000099"><FONT SIZE=-1>$fields[17] </FONT></FONT></TD>
<TD><B><FONT COLOR="#000099"><FONT SIZE=-1>$fields[18] </FONT></FONT></TD>
</TR></TABLE>
endresult
$database->go_next;
@fields = $database->get_record;
}
 
In this idea each record is showing in  each table.
one table per one record.
but i want to show all records in one table.. what changes i have to make....
i am new to this cgi...
 
mon1Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

guadalupeCommented:
Just take the table header and footer out of the loop like this:

#!/usr/local/bin/perl

print qq(<TABLE BORDER WIDTH="100%">);

while(!$database->eof)
{
print <<endresult;
<TR>
<TD><B><FONT COLOR="#000099"><FONT SIZE=-1>$fields[11] </FONT></FONT></TD>
<TD><B><FONT COLOR="#000099"><FONT SIZE=-1>$fields[5] </FONT></FONT></TD>
<TD><B><FONT COLOR="#000099"><FONT SIZE=-1>$fields[3] </FONT></FONT></TD>
<TD><B><FONT COLOR="#000099"><FONT SIZE=-1>$fields[15] </FONT></FONT></TD>
<TD><B><FONT COLOR="#000099"><FONT SIZE=-1>$fields[17] </FONT></FONT></TD>
<TD><B><FONT COLOR="#000099"><FONT SIZE=-1>$fields[18] </FONT></FONT></TD>
</TR>
endresult
$database->go_next;
@fields = $database->get_record;
}

print "</TABLE>";
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mon1Author Commented:
Hi friend ..
   absolutely corcet answer.
thanksx fora lot..
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Fonts Typography

From novice to tech pro — start learning today.