Hi, hope someone can help out here with my 1st question to the monks.
I'm just starting to venture into the world of CGI.pm and trying to use the module instead of hand coding HTML.
My main problem is something which I suspect is simple, and just down to my inexperience - I'm reading some data from mysql and generating a table to display the output. I've no problem getting the data from mysql, but what I'm having problems with is displaying it using pure CGI inside a loop.
At the minute, I'm mixing hand coded HTML & CGI object's as shown below:
...my $html_page = new CGI;
I suspect there must be a way of integrating the loop into the print, something likeprint "<TABLE>\n"; while (my $db_data = $sth->fetchrow_arrayref()) { print $html_page->Tr( $html_page->td($db_data) ); } print "</TABLE>\n";
but at the minute I'm lostprint $html_page->table( while ...... { $html_page->Tr( $html_page->td($db_data) ) } );
In reply to CGI Tables by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |