|
thanks for responding so quickly - (I'm fairly new to this) so if I understand correctly my code would look like this on my home page - which is where the referrer would be coming from in my case:
<?php
session_start();
if (!isset($_SESSION['ref']))
{
$_SESSION['ref'] = getenv('HTTP_REFERER'); // or $_SERVER['HTTP_REFERER'] would work
}
// Do your checks here.
if (strpos($ref,"wherever.com")>0) { echo '<span class="phonenumber">888-111-1234</span>'; }
else { echo '<span class="phonenumber">888-555-6789</span>'; };
?>
Then on the other pages (which have different headers) what would the corresponding code look like?
Same as above?
I just need it to understand 'ok we know who the referrer is now and so we are going to keep the changed number throughout the site'
I think my big problem is that I am navigating to a new header almost everytime and not the same header.
|