My code is detecting an affiliate string. This is my code:
<?php
//DETECT AFFILIATE ID
if(empty($_SESSION["aid"]))
{
$aid = $_GET["aid"];
if(empty($aid))
$aid = $_COOKIE["aid"];
if(empty($aid))
$aid = 1;
setcookie("aid", $aid, strtotime("+10 years"), "/");
$_SESSION["aid"] = $aid;
}
?>
It’s setting a cookie when an “aid” query string is entered.