View Single Post
Old 10-05-2012, 04:58 PM   PM User | #1
jmcnulty
New to the CF scene

 
Join Date: Sep 2012
Posts: 5
Thanks: 1
Thanked 0 Times in 0 Posts
jmcnulty is an unknown quantity at this point
storing a session http_referer

hi

I am trying to get the phone number to change at the top of my site dependent on where the visitor comes from...

The code works when the user initially lands on the page - but when the user navigates throughout the rest of the site the number changes back to the regular number again...

I know I somehow need to store a session - but I don't know how to do that correctly - I also don't know what I need to put on the headers of other pages to correspond correctly - I imagine its not the same code for the other pages because I would have to just store the session not start a new one each time.

HELP PLEASE!

<?php $ref=getenv('HTTP_REFERER');
if (strpos($ref,"wherever.com")>0) { echo '<span class="phonenumber">888-111-1234</span>'; }
else { echo '<span class="phonenumber">888-555-6789</span>'; }; ?>
jmcnulty is offline   Reply With Quote