Jump to content

Change an image based on landing page - Possible?


Dave3765

Recommended Posts

Hi,

 

Ok, I have 2 landing pages and I need to display a different contact phone number as an image for each page.

 

The thing that's got me thinking is that I need this image (which is in a standard header file) to stay the same for each visitor across all the pages on my site, depending on which landing page they came in from. I need the phone number image to stay the same for 30 minutes even if a user revisits one or more of the landing pages within that 30 minutes.

 

So is a visitor comes in from landingpage1 they see phonenumber1 throughout the site for 30mins - if a visitor comes in from landingpage2 they see phonenumber2 across the site for 30mins.

 

What would be the best way to do this? php? javascript? would it need cookies?

 

Any suggestions?

 

Thanks Guys  8)

You could do it all through sessions. When someone comes to either page, you first check to see if the session exists. If it does, we know they've already been on your website, and so don't need to do anything.

 

If, on the other hand, it does not exist, we simply set which image we should display throughout the site. On each page, we load the correct image - the name/link to which will be in the session.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.