in reply to How can I pass the URL of the page I am on?

... and if you want to find out the URL of the webpage that triggered your CGI in the first all you have to do is:
$referrer=$ENV{'HTTP_REFERER'};
and that's that. No CGI.pm, no forms, no nothin'.

Replies are listed 'Best First'.
RE: Answer: How can I pass the URL of the page I am on?
by merlyn (Sage) on Oct 10, 2000 at 23:48 UTC
    And not reliable!
    • Referer may be missing (stripped by security software and/or firewalls)
    • Referer may be wrong (some browsers blow it on the spec)
    • Referer is trivially faked
    The big clue is, how can you rely on a variable with an incorrectly spelled name!

    -- Randal L. Schwartz, Perl hacker