in reply to Re^2: loading a .txe into a database
in thread loading a .txe into a database

Why when i run this i get an error saying Undefined subroutine &main::start_table called at the line where the pritn start_table is:
How can i write it?
==================================================== print start_form(-action=>'games.pl'); print start_table( {class=>'games'} ); while( $row = $sth->fetchrow_hashref ) { print Tr( td( {-width=>'20%'}, submit( $row->{gamename} )) +, td( {-width=>'75%'}, $row->{gamedesc} ), td( {-width=>'5%'}, $row->{gamecounter} ) ); } print end_table; print end_form, br; ====================================================

Replies are listed 'Best First'.
Re^4: loading a .txe into a database
by polettix (Vicar) on May 03, 2005 at 11:29 UTC
    It seems that you didn't import start_table and stop_table from CGI.pm, so it tries to look for it in the current package (which happens to be main). Example (munged from perldoc CGI):
    # Imports all standard symbols + "start_table" and "end_table". use CGI qw(:standard *table);

    Flavio (perl -e 'print(scalar(reverse("\nti.xittelop\@oivalf")))')

    Don't fool yourself.