FAQ
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.

Search Discussions

  • Cm at Mar 10, 2009 at 9:15 am

    davidgould at davidgould.com 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.
  • Davidgould at Mar 11, 2009 at 3:08 am

    On Mar 10, 7:15?pm, cm wrote:
    davidgo... at davidgould.com 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
    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?
  • Davidgould at Mar 11, 2009 at 3:08 am

    On Mar 10, 7:15?pm, cm wrote:
    davidgo... at davidgould.com 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
    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?
  • Tim Chase at Mar 10, 2009 at 10:02 am

    davidgould at davidgould.com wrote:
    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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedMar 10, '09 at 4:36a
activeMar 11, '09 at 3:08a
posts5
users3
websitepython.org

3 users in discussion

Davidgould: 3 posts Tim Chase: 1 post Cm: 1 post

People

Translate

site design / logo © 2022 Grokbase