View Single Post
Old 07-01-2011, 10:34 AM  
robber
Web Developer
 
Industry Role:
Join Date: Jan 2011
Location: UK
Posts: 264
OK then to have this set in a cookie like you have requested you would need to change the header script to being:

Code:
<?php 
if(!empty($_POST['id'])){setcookie("affid",$_POST['id']);} #<-- Sets the affiliate id
{$affid = $_COOKIE['affid'];} #<-- assign affiliate id
if(empty($_COOKIE['affid'])){$affid = "xxxxxx";} #<-- add a default value
 ?>
This will set a cookie for the user instead of storing the value within a session on the server

Hope this helps. Please feel free to ask if you have any other questions

Rob
robber is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook