RE: [PHP] $HTTP_Referer
| From: | Pablo Gosse | Date: | Thu, 06 Nov 2003 18:49:57 +0000 |
| Subject: | RE: [PHP] $HTTP_Referer | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-168760@lists.php.net to get a copy of this message | ||
On Thursday, November 06, 2003 10:31 AM, Josephin wrote:
<snip>
xy.html ------->form.html------>formmailer.php
want the $HTTP_Referer or HTTP_URI, file only, (of xy.html)
-->to be forwarded to form.html,
-->to be converted in a variable,
-->which is passed on to formmailer.php, which will use it as "subject".
</snip>
Hi Josephin.
Simply use $_SERVER['HTTP_REFERER'] to populate a hidden field in your
form.
So,
<input type="hidden" name="referrer" value="<?php echo
$_SERVER['HTTP_REFERER']; ?>">
Cheers,
Pablo