Determining from which web page a cgi script is invoked?

D

davidgould

Given a webpage test.html that has a form with a cgi script, how can
you determine inside the cgi script the name of the webpage that
invoked the script?

I have many different html pages that use a common cgi script for form
processing and want to determine the name of the webpage.

Thanks.
 
C

cm

(e-mail address removed) escribió:
Given a webpage test.html that has a form with a cgi script, how can
you determine inside the cgi script the name of the webpage that
invoked the script?

I have many different html pages that use a common cgi script for form
processing and want to determine the name of the webpage.

quick&dirty: Add a hidden form var with the page/form name

Regards,

Carlos.
 
T

Tim Chase

Given a webpage test.html that has a form with a cgi script, how can
you determine inside the cgi script the name of the webpage that
invoked the script?

I have many different html pages that use a common cgi script for form
processing and want to determine the name of the webpage.

Not that this has anything to do with python...but you're
interested in the standard "referrer"/"referer" field[1] in your
request headers. Note that this field IS OPTIONAL. Firefox
makes it easy to keep the referrer private, so it's never sent.

-tkc

[1]
http://en.wikipedia.org/wiki/Referer
 
D

davidgould

(e-mail address removed) escribió:



quick&dirty: Add a hidden form var with the page/form name

Yes, I had considered this. Is there any way to quickly automate the
setting of this var to match the html page that contains it?
 
D

davidgould

(e-mail address removed) escribió:



quick&dirty: Add a hidden form var with the page/form name

Yes, I had considered this. Is there any way to quickly automate the
setting of this var to match the html page that contains it?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top