Changeset 215


Ignore:
Timestamp:
Oct 27, 2006, 10:44:39 PM (13 years ago)
Author:
David Sheldon
Message:

better return link handling.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/npemap.org.uk/cgi/bad-postcode.fcgi

    r169 r215  
    3434    # If we're given return URL parameters, basic sanity check to stop
    3535    # funny business
    36     my $returnlink = '<a href="' . $returnBaseURL . '/tiles/map.html">Go back to the map</a>';
     36    my $returnURL= '/tiles/map.html';
     37    if (defined $ENV{HTTP_REFERER}) {
     38        $returnURL = $ENV{HTTP_REFERER};
     39    }
     40
     41    my $returnlink = "<a href='$returnURL'>Go back to the map</a>";
    3742
    3843    # In case the database went away, make sure we have a connection
Note: See TracChangeset for help on using the changeset viewer.