Click to See Complete Forum and Search --> : Trying to retrieve the previous page's URL


Silencer
07-29-2008, 09:21 AM
Hello,

I am trying to create a 'Refer' option which allows the user to refer a certain listing he sees to a friend. When user clicks 'Refer' he fills out a form where he inputs his own e-mail address, his friend's e-mail address, and his name. The message of the body will simply be a link to the URL he wishes to forward. What is the best way to send text e-mail with simply the URL of a page?

Thanks in advance!

KDLA
07-29-2008, 10:19 AM
Take a look here: http://javascript.internet.com/page-details/email-this-page.html

KDLA

LeeU
07-29-2008, 03:26 PM
If you prefer PHP, try this (http://www.cj-design.com/products/free_downloads/php_scripts/cjsendpage). There is also a popup version.

Silencer
07-30-2008, 05:28 AM
Looking through those scripts, I noticed:
$link = $HTTP_REFERER;

Does this line of code have HTTP_REFERER take the last page you were looking
and store it in $link?

If so, I think this is what I need. Would all I need to do is "echo $link" as the message at this point?
I already have most of the form written. I just need a way to get the link from the "previous page" to be put into the text of the e-mail.

Thanks again, guys.