ok it's definitely getting closer. Here is my hopeful final issue.
just like you had mentioned embed this code at the very top of my primary page:
CODE A
PHP Code:
<?php session_start(); if (!isset($_SESSION['phonenumber'])) { $ref = getenv('HTTP_REFERER'); if (strpos($ref, "localprice.com") !== false)
{
$_SESSION['phonenumber'] = '888-540-9909';
}
else
{
$_SESSION['phonenumber'] = '888-646-0860';
}
}
?>
Then call upon it somewhere on the page:
CODE B
PHP Code:
<?php session_start(); printf('<span class="phonenumbertext">%s</span>', $_SESSION['phonenumber']);?>
This works absolutely perfectly.
My issue now is - when navigating away from this page into my internal page -
I have different header files - so when I use
(Code B) it doesn't know what it is referencing.
On the flip side if I try to embed the first block of code
(Code A) onto the other header files but this does not work because all traffic is coming through the home page - so the referring page is my own domain, the home page.
Is there a way I can put some code similiar to
(Code A) on my internal pages that says 'ignore my own domain as the referer'
I apologize for the complete hassle with this but it's honestly just going over my head.
It's so very very close.