Hello, all:

Say have 3 separate landing pages on my site (or more even), but they all end up at one common destination, how can i make it so each visitor can then go back to landing page they came from? here's the scenario:

Say I have links from Google, Yahoo, and mySpace that take people to each "site's" landing page; so for Google ads I would have my own "Google-Landing-page"... so this way I can keep track of visitors on a per landing-page basis. Thing is, once each person reaches their own landing page, they are then taken to set of pages whcih are then common to all... I want to in turn be able to put a link ("Back to Landing Page" button) in these common pages so they each can go back to the landing page each of them came from (Yahoo-persom, goes back to yahoo-landing page, Google person goes back to Google Landing-page and so forth.

I thought probably set some kind of a cookie, but not exatly sure how, or even if it's the right way... to do that.

thanks in advance!

Thats one I'd like to know myself. My initial thoughts would be to play around with the command: $_SERVER.

However I do not think this would work because the browser history is client-side, and the php would be server-side.

There's a 99% chance I'm talking rubbish but I'm sure a PHP Guru will be along shortly to save the day!

Anthony

right, I thought about that... a REFERER, probably could be done, thru there somehow...

Hey, Anthony.. if it helps you here is answer.. thru SESSIONS. such a simple and elegant solution, nothig beats PHP! I got from somebody at another forum:

on landingPage.php:

<?php
session_start();
$_SESSION = 'http://www.cnn.com/';
?>


Link on common destination pages:

<?php
session_start();
echo "<A href='".$_SESSION."'>Back to landing page.</A>";
?>

I just tested it, works like a charm!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.