Changeset 70
- Timestamp:
- Oct 17, 2006, 5:20:52 PM (14 years ago)
- Location:
- trunk/npemap.org.uk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/npemap.org.uk/cgi/submit.fcgi
r47 r70 7 7 use CGI::Fast qw/:standard -debug/; 8 8 use Geo::Postcode; 9 use Date::Format;10 9 11 10 use vars qw($dbname $dbhost $dbuser $dbpass); … … 120 119 } 121 120 122 $sth = $dbh->prepare('INSERT INTO postcodes (outward, inward, raw_postcode, easting, northing, ip, created_at, source) VALUES (?,?, ?, ?, ?, ?, ?, 0)');123 if ($sth->execute($outward, $inward, $raw_postcode, $easting, $northing, $ENV{'REMOTE_ADDR'} , time2str('%Y-%m-%d %H:%M:%S', time))) {121 $sth = $dbh->prepare('INSERT INTO postcodes (outward, inward, raw_postcode, easting, northing, ip, source) VALUES (?, ?, ?, ?, ?, ?, 0)'); 122 if ($sth->execute($outward, $inward, $raw_postcode, $easting, $northing, $ENV{'REMOTE_ADDR'})) { 124 123 print "Content-type: text/html\n\n"; 125 124 print "<html><head><title>Thank you</title></head>\n"; -
trunk/npemap.org.uk/documents/deployment.txt
r67 r70 3 3 Assuming apache2 installed: 4 4 5 # apt-get install libgeo-postcode-perl libdbd-pg-perl libcgi-fast-perl libapache2-mod-fastcgi libtimedate-perl5 # apt-get install libgeo-postcode-perl libdbd-pg-perl libcgi-fast-perl libapache2-mod-fastcgi 6 6 Copy submit.fcgi to a location that the web server will use as CGI (eg /usr/lib/cgi-bin) 7 7 # a2enmod fastcgi
Note: See TracChangeset
for help on using the changeset viewer.