Do you have a question? Post it now! No Registration Necessary. Now with pictures!
August 9, 2005, 8:25 am
rate this thread
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=".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.
Re: Referring URL
If your host supports server-side includes (SSI), you can use the
<input type="hidden" name="referringURL" value="<!--#echo
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)