I've just started dabbling with PHP and have recently completed an agency listing site based on Jon Roig's "OpenRealty". The agency now want to link to a couple of other agencies, each carrying links to each others web sites.
Is there an easy way to track who's referring who to whom, ie: how can I pick up that a client wanting to purchase something from Agency1 was referred by Agency2?
So far, this is what I've tried:
Setting up a parameter on the link from Agency2 to Agency1 (eg, on Agency2 web site, the link to Agency1 shows www.agency1.com/index.php?refby=Agency2) ? then to access it on the linked to page:
$refby = $GET['refby'];
The problem here is that $refby is only usable on the first page - if the client goes off to search the listings, for example, then $refby seems to get unset. Do I need an interim page to do the $GET before entering the main site? Would $refby then remain set and available on all pages in the site, or is there an easier way to do the whole thing?
Thanks,
Steve