I would like to add a Referer hook to the form output- basically I want to know what page they were on when they accessed the form and sent it to me.
$_SERVER['HTTP_REFERER']
Example: form is hosted on this page:
anysite.com/content.php/1950-friendly-url
when the form is submitted I want to have a field that shows:
Referer: anysite.com/content.php/1950-friendly-url
Instead all I can see is:
Referer: anysite.com/forms.php?do=form&fid=47
Any ideas on the correct syntax to add it to the Form Hook before submission?
I've tried:
PHP Code:
$formoutput .= $form[preq] . "Referer:" . $_SERVER['HTTP_REFERER'];
PHP Code:
$formoutput .= $form[preq] . "Referer:" . $_GET['auth'] . $form[psta];
PHP Code:
$formoutput .= $form[preq] . "Referer:" . $_SERVER['REQUEST_URI'];
PHP Code:
$formoutput .= $form[preq] . "Referer:" . $_SERVER['HTTP_REFERER'];
PHP Code:
$formoutput .= $form[preq] . "Referer:" . $_SERVER['PHP_SELF'];
PHP Code:
$formoutput .= $form[preq] . "Referer:" . $_SERVER['QUERY_STRING'];
PHP Code:
$formoutput .= $form[preq] . "Referer:" . $_SERVER['PATH_INFO'];
PHP Code:
$formoutput .= $form[preq] . "Referer:" . $_SESSION['loc']=$_SERVER['PHP_SELF'] . $form[psta];
PHP Code:
$formoutput .= $form[preq] . "Referer:" . $_SERVER['REQUEST_URI'] .
$form[psta];
I basically want to know if people are accessing the form directly by sharing the link or whether they are accessing the form from the specific page I am embedding it within.