#!/usr/bin/perl -Tw # -Tw turns on taint checking and warnings ############################################################ ## Written and copyright 2002 by ## Jacqueline D. Hamilton (kira@cgi101.com) ## ## This code is excerpted from "CGI Programming 201" ## (http://www.cgi101.com/advanced) ## ## You may use this code on your own website, however ## you may not publish or sell any copy or derivative work ## without permission of the author. ############################################################# # be strict, declare variables with my() use strict; #include the current directory in the path for searching # for modules use lib '.'; # this includes the MyBoard.pm module use MyBoard; &do_header("Forums"); print qq(

My Forums

\n); my($sth) = $dbh->prepare("select * from forums order by rank, name") or &dbdie; my($rv) = $sth->execute; my($f); while ($f = $sth->fetchrow_hashref) { print qq($f->{name} - $f->{description}

\n); } &do_footer;