Gossamer Forum
Home : General : Internet Technologies :

Passing http:// address through to another page

Quote Reply
Passing http:// address through to another page
I'm wanting to do the following:

Down the bottom of each page have a link called "Email this page to a friend".

How can I pass the address of the current page through to the next page with the form?

---------------
Cricket Web - http://www.cricketweb.net
Cricket Web Forum - http://forum.cricketweb.net/
---------------
Quote Reply
Re: [Philip_Clark] Passing http:// address through to another page In reply to
You using a HTML page? If using a Perl script, you could use;

scripts.cgi?page=$ENV{REQUEST_URI}

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Passing http:// address through to another page In reply to
Cheers for the response.

I'll be using html pages.

---------------
Cricket Web - http://www.cricketweb.net
Cricket Web Forum - http://forum.cricketweb.net/
---------------
Quote Reply
Re: [Philip_Clark] Passing http:// address through to another page In reply to
With SSI enabled?

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Passing http:// address through to another page In reply to
Yep.

---------------
Cricket Web - http://www.cricketweb.net
Cricket Web Forum - http://forum.cricketweb.net/
---------------
Quote Reply
Re: [Philip_Clark] Passing http:// address through to another page In reply to
You could use something like this to grab the URL of the page you are on;

<!--#echo var="REQUEST_URI" -->


... see here for more details on SSI:

http://home.snafu.de/...ssi/index.shtml#echo

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Passing http:// address through to another page In reply to
Problem is mate, I need it for the previous page I was on. Any ideas?

---------------
Cricket Web - http://www.cricketweb.net
Cricket Web Forum - http://forum.cricketweb.net/
---------------
Quote Reply
Re: [Philip_Clark] Passing http:// address through to another page In reply to
To give you some idea, I'm wanting to get it working the same way as here:

http://usa.cricinfo.com/...CC_CHAMPIONS_TROPHY/

see the bottom of the left menu for "Email to a friend".

---------------
Cricket Web - http://www.cricketweb.net
Cricket Web Forum - http://forum.cricketweb.net/
---------------
Quote Reply
Re: [Philip_Clark] Passing http:// address through to another page In reply to
<!--#echo var="HTTP_REFERER" -->

or

$ENV{'HTTP_REFERER'}

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Philip_Clark] Passing http:// address through to another page In reply to
Looks like they are just picking up the URL to refer through, in the actual Perl script. They would be using something like;

Code:
my $url = $ENV{'HTTP_REFERER'} || "http://www.yoursite.com";

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Passing http:// address through to another page In reply to
In Reply To:
<!--#echo var="HTTP_REFERER" -->

or

$ENV{'HTTP_REFERER'}

Cheers


Thanks Andy Smile - exactly what I was after. Just couldn't quite remember what it was Cool

---------------
Cricket Web - http://www.cricketweb.net
Cricket Web Forum - http://forum.cricketweb.net/
---------------