I'm writing some scripts to handle an affiliate program. The cart I built already deals.
So I have a page with
if($afid) {
setcookie("afidc","$afid");
setcookie("afrefer","$HTTP_REFERER");
}
So it tracks an affiliate sale. This works fine, now I add another if:
if(empty($afidc)) {
if($afid) {
setcookie("afidc","$afid");
setcookie("afrefer","$HTTP_REFERER");
}
}
Now it stops working, but this same code works on another page. Ack.
So after tinkering a while to figure out what's going on, I remove the outer if so it's back to the original, but lo and behold the original no longer works... ARGGHHH!!! Anyone experience anything like this or see something in the code I am simply missing. I think I'm loosing my mind.