Changeset 26


Ignore:
Timestamp:
Oct 12, 2006, 6:32:38 PM (13 years ago)
Author:
Dominic Hargreaves
Message:

Fix header so it actually works as a CGI

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/npemap.org.uk/cgi/submit.cgi

    r15 r26  
    6767$sth = $dbh->prepare('INSERT INTO postcodes (outward, inward, raw_postcode, easting, northing, ip, created_at, source) VALUES (?, ?, ?, ?, ?, ?, ?, 0)');
    6868if ($sth->execute($outward, $inward, $raw_postcode, $easting, $northing, $ENV{'REMOTE_ADDR'}, time2str('%Y-%m-%d %H:%M:%S', time))) {
    69     print "Content-type: text/html\n";
     69    print "Content-type: text/html\n\n";
    7070    print "<html><head><title>Thank you</title></head>\n";
    7171    print "<body>Thank you for telling us where your post code is!\n";
     
    7979sub print_err ($) {
    8080    my $err = shift;
    81     print "Content-type: text/html\n";
     81    print "Content-type: text/html\n\n";
    8282    print "<html><head><title>Error submitting</title></head>\n";
    8383    print "<body><p>The following error occurred whilst submitting data:\n";
Note: See TracChangeset for help on using the changeset viewer.