Changeset 236


Ignore:
Timestamp:
Oct 29, 2006, 7:25:08 PM (13 years ago)
Author:
Dominic Hargreaves
Message:

Add print_html_err to library

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/npemap.org.uk/perllib/NPEMap.pm

    r221 r236  
    1111require Exporter;
    1212@ISA    = qw(Exporter);
    13 @EXPORT = qw(setup_dbh);
     13@EXPORT = qw(setup_dbh print_html_err);
    1414
    1515sub setup_dbh {
     
    1919}
    2020
     21sub print_html_err($$) {
     22    my $err = shift;
     23    my $returnlink = shift;
     24    print "Content-type: text/html\n\n";
     25    print "<html><head><title>Error submitting</title></head>\n";
     26    print "<body><p>The following error occurred whilst submitting data:\n";
     27    print CGI::escapeHTML($err);
     28    print "</p><p>$returnlink</p>\n";
     29    print "</body></html>\n";
     30}
     31
    21321;
Note: See TracChangeset for help on using the changeset viewer.