Hi
I've got a very useful PHP email script - http://www.gospelcom.net/guide/resources/formcode.phps
to which I would like to add the ability for the email to me from site visitors, to include the URL of the referring page they came from. This puts their email in context so it makes more sense.
I have tried all sorts of things on the recommendation of friends, but because the page is essentially three pages in one, it always gives its own URL as the referrer.
If anyone can see a way of doing this - even it is just to drop the URL visibly into the text area, I'd be very grateful.
Thanks
Tony
PHP email form problem
Moderator: General Moderators
Depending on how we cant see how your page(s) actually work (including pages? switch()'ing function being used? etc.), you need to tweak this around yourself abit...
...might be something worthlooking more into. Do a phpinfo() and check the $_SERVER variables at the bottom of that page, to find out more useful things.
Code: Select all
echo 'http://'.$_SERVER['SERVER_NAME'].$_SERVER['SCRIPT_NAME'];
echo 'http://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
echo __FILE__;
echo basename(__FILE__);