in reply to Did I already print a header?
And then in my error code (same code shared by all the scripts in the system), I can see if I need a header or not.print $q->header(), $q->start_html(-title=>"R3: edit ads", -style=>{-code=>&css()}); $q->{header_was_sent}++;
The marquee tag is annoying, but it gets noticed.sub error { my (@msgs) = @_; my $firstline = shift(@msgs); if (!$q->{header_was_sent}) { print $q->header(), $q->start_html(-title=>"R3: error", -style=>{-code=>&css()}); } print "<br><marquee><font class=\"error\"> Need help? Something busted? + Confused? Email the error message below to XXXXXXXXXXXXXXX </font>< +/marquee><br>", "<h1 class=\"error\"> Error: $firstline </h1><h2 class=\"error\">" +, scalar(localtime), "<br>", join ("<br>",@msgs), "</h2>\n"; print $q->end_html; exit(0); }
Again, this level of openness is not suitable for open web!my @inqs = @{$dbh_g->selectcol_arrayref($sql,undef,$adid)} or &error +("Bad selectcol in get_inqs", $sql, $dbh_g->errstr);
|
|---|