PHP help

we used to get customers from various sources.(ex: search engines). if customers land on our site from google then the URL will be we need track those ref,source values and need to transfer to another site. there are about 50 static pages and in each page there are about 10-15 links. after landing on the site customer may navigate to other static pages. But at the end we need to somehow get the ref,sub values and append to the URL that redirects to another site. How can this done in PHP…?( or javascript)


You use the $_GET[’’] function. For example say you have the following URL:

You can use-
$source = $_GET[‘source’]; //This now would be equal to XXXXX.
$ref = $_GET[‘ref’]; //This now would be equal to google.

//Then you can use links like
New Site

<?php ?>[/php]

You can also make hard coded urls in the same way…
New Site

And still in the page the link goes to pull out those values.

another possibility is 2 use sessions.
then u may include just one line line at the top of every static page.

<?php include(''); ?>
if(isset($_GET[‘ref’]) $_SESSION[‘ref’]=$_GET[‘ref’];


and on the redirection page links u may use the $_SESSION values

Sponsor our Newsletter | Privacy Policy | Terms of Service