KillerCreatives Posted June 10, 2009 Share Posted June 10, 2009 Hi guys Just venturing in to some basic PHP scripting & I have a problem! I've recently completed a website for a client which includes a simple form with some verification/compulsory fields; all working well so far. The client has several other websites/partners sending leads through to their main site, and they need to be able to identify which one of those partner websites the traffic came from - this is where I'm getting stuck. I originally posted: <input type='hidden' name='referrer' value='<?php print $_SERVER['HTTP_referer']?>'> but that just reports back: <input type='hidden' name='referrer' value=''> I've seen some script dotted around the Web which kind of works, but only actually shows the URL of the client's page the form was sent from, not the page that sent the customer to the client's site in the first page. Help?! Link to comment https://forums.phpfreaks.com/topic/161652-referralsource-script/ Share on other sites More sharing options...
trq Posted June 10, 2009 Share Posted June 10, 2009 The variable your after is $_SERVER['HTTP_REFERER'] but to be honest, any data issued by the client is unreliable. Link to comment https://forums.phpfreaks.com/topic/161652-referralsource-script/#findComment-852973 Share on other sites More sharing options...
KillerCreatives Posted June 10, 2009 Author Share Posted June 10, 2009 D'oh, so just changing 'referer' to upper case... Thanks for that! I hear what you're saying about the client & data; they just want to be able to see *something*, typical client I guess! Thanks again... Link to comment https://forums.phpfreaks.com/topic/161652-referralsource-script/#findComment-852975 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.