guymclaren Posted September 19, 2008 Share Posted September 19, 2008 $coid = $_COOKIE["affiliate"]; if ($coid == NULL) { $myid = $_GET['aff']; if ($myid != NULL){ setcookie("affiliate","$myid"); } else { setcookie("affiliate","MCL01"); header('Location:http://webtech.co.za/order.php'); } } Link to comment https://forums.phpfreaks.com/topic/124970-solved-why-does-this-create-both-cookies/ Share on other sites More sharing options...
DyslexicDog Posted September 19, 2008 Share Posted September 19, 2008 Try this. $coid = $_COOKIE["affiliate"]; if ($coid == NULL) { $myid = $_GET['aff']; if ($myid !== NULL){ setcookie("affiliate","$myid"); } else { setcookie("affiliate","MCL01"); header('Location:http://webtech.co.za/order.php'); } } Link to comment https://forums.phpfreaks.com/topic/124970-solved-why-does-this-create-both-cookies/#findComment-645714 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.