if( $name eq 'showlog' ) { $select = $dbh->prepare( "SELECT * FROM guestlog ORDER BY date DESC" ); $select->execute; print br; print table( {class=>'info'} ); while( $row = $select->fetchrow_hashref ) { print Tr( td( {width=>'35%', class=>'aquamarine'}, $row->{host} ), td( {width=>'15%', class=>'white'}, $row->{date} ), td( {width=>'45%', class=>'cyan'}, $row->{passage} ), td( {width=>'5%', class=>'lime'}, $row->{counter} ) ); } print '';