Ajax software
Free javascripts
↑
Main Page
// display product details
echo ‘You have selected product #‘ . $_GET[‘product_id’] .
‘ from category #‘ . $_GET[‘category_id’];
// display affiliate details
echo ‘<br /><br /> You got here through affiliate: ‘;
if (!isset($_SESSION[‘aff_id’]))
{
echo ‘(no affiliate)‘;
}
else
{
echo $_SESSION[‘aff_id’];
}
?>
3.
Test your new script now. The first test consists of loading a product page without an affiliate
ID, such as
http://seophp.example.com/Products/SEO-Toolbox-C6/Link-Juice-
P31.html.
Figure 5-1 shows the result.
Figure 5-1
4.
Now add an affiliate ID. Load
http://seophp.example.com/Products/SEO-Toolbox-C6/
Link-Juice-P31.html?aff_id=987
. Expect to be correctly redirected to the main product
page, and still get the affiliate ID retained. Figure 5-2 shows the expected output.
Figure 5-2
110
Chapter 5: Duplicate Content
c05.qxd:c05 10:41 110
Ajax software
Free javascripts
→