Referring URL

Discussion in 'HTML' started by BernieH, Aug 9, 2005.

  1. BernieH

    BernieH Guest

    This is probably an embarrasingly basic question ...

    I have a form which gets emailed via a CGI script. I'm trying to grab the
    URL of the page on which users clicked this form.

    This is part of the form's html -

    <FORM action="http://www.myaddress.com/cgibin/forms.cgi" method="post">
    <INPUT type="hidden" name=".to_address" value="">
    <INPUT type="hidden" name=".email_subject" value="Submit form">

    I'm guessing I need a new line such as

    <INPUT type="hidden" name="referringURL" value="xxxxx">

    It's the "xxxxx" bit which I'm not sure how to fill in.

    TIA

    bernieh
    BernieH, Aug 9, 2005
    #1
    1. Advertising

  2. BernieH

    Safalra Guest

    BernieH wrote:
    > I have a form which gets emailed via a CGI script. I'm trying to grab the
    > URL of the page on which users clicked this form.
    > This is part of the form's html -
    > [snip]
    > I'm guessing I need a new line such as
    > <INPUT type="hidden" name="referringURL" value="xxxxx">
    > It's the "xxxxx" bit which I'm not sure how to fill in.


    If your host supports server-side includes (SSI), you can use the
    following:

    <input type="hidden" name="referringURL" value="<!--#echo
    var="HTTP_REFERER"-->">

    The <!--#echo var="HTTP_REFERER"--> will be replaced with the referer
    (if one was specified). On the default configuration of most servers,
    you'll need to rename the form's HTML file so it has the extension
    '.shtml' rather than '.html' to get this to work.

    --
    Safalra (Stephen Morley)
    http://www.safalra.com/hypertext/
    Safalra, Aug 9, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. George

    Referring URL\VB

    George, Feb 9, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    7,468
    George
    Feb 9, 2004
  2. tiewknvc9

    getting a referring url?

    tiewknvc9, Sep 11, 2006, in forum: Java
    Replies:
    2
    Views:
    7,843
    Rogan Dawes
    Sep 11, 2006
  3. paladin

    Missing Referring URL in log files

    paladin, Jan 10, 2007, in forum: ASP .Net
    Replies:
    2
    Views:
    523
    paladin
    Jan 11, 2007
  4. slamar
    Replies:
    0
    Views:
    875
    slamar
    Aug 17, 2011
  5. Chumley the Walrus

    Checking to see if a referring url/link matches

    Chumley the Walrus, Jul 1, 2004, in forum: ASP General
    Replies:
    4
    Views:
    140
    Steven Burn
    Jul 1, 2004
Loading...

Share This Page