I am trying to add a 'feedback' button on every page on a website. I want to add the button to the page footer which is accessed on each page using the include function. I want the feedback button to open a email form with a hidden option to include the url that the user has come from. I have tried
$url="http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
and
$url=$HTTP_SERV ER_VARS['SCRIPT_FILENAM E'];
both of which give me the footer url rather than the actual page which the footer is included in.
Any Ideas?
In case the above doesn't make sense I have outlined the basics of the page coding below
html
head
title etc
/head
body
contents of page
php include footer.php
/body
/html
and the php code I have attempted is in the footer.php page
$url="http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
and
$url=$HTTP_SERV ER_VARS['SCRIPT_FILENAM E'];
both of which give me the footer url rather than the actual page which the footer is included in.
Any Ideas?
In case the above doesn't make sense I have outlined the basics of the page coding below
html
head
title etc
/head
body
contents of page
php include footer.php
/body
/html
and the php code I have attempted is in the footer.php page
Comment