#!/usr/bin/perl -Tw ############################################################ ## 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. ############################################################# use strict; use lib '../'; use MyBoard qw(:DEFAULT delete); my($msgid, $sth, $rv, $msg, $resp); # untaint the message number # this is different from message.cgi in that it's a posted value # rather than the query string. if ($cgi->param('msgid') =~ /^(\d+)$/) { $msgid = $1; } else { &dienice($cgi->param('msgid') . " isn't a valid message number."); } &do_header("Delete Post - Results"); print qq(
Thread deleted.
\n); } else { &delete($msgid); print qq(Message #$msgid deleted.
\n); } print qq(\n); &do_footer;