Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Obtaining requesting form's URL?

by tcf22 (Priest)
on Mar 22, 2004 at 21:00 UTC ( #338767=note: print w/replies, xml ) Need Help??


in reply to Obtaining requesting form's URL?

You should be able to use the environmnet variable HTTP_REFERER.

eg.
if($ENV{HTTP_REFERER} eq 'http://abc/searchForm2.cgi'){ # Do whatever }

- Tom

Replies are listed 'Best First'.
Re: Obtaining requesting form's URL?
by b10m (Vicar) on Mar 22, 2004 at 21:11 UTC

    As often posted, referers aren't too reliable (I for one turned "Send Referrer" off in my browser).

    Another solution (not too reliable neither) could be to add a hidden field in the form with the URL, or script name. Or analyze your webbrowser's access log (may be overkill, but probably works best).

    --
    b10m

    All code is usually tested, but rarely trusted.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://338767]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (8)
As of 2021-10-22 16:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (85 votes). Check out past polls.

    Notices?