I have a simple file called index.php. I need to pass it a querystring that will be stored inside a never-expiring cookie. The file looks exactly like this :
<?php
if (isset($_GET['referrer_id']))
{
$querystringWithJunk = $_GET['referrer_id'];
$querystringArray = explode('/', $querystringWithJunk);
setcookie("referrer_id", $querystringArray[0], time() + 60*60*24*365*100);
}?>
However, no cookie is set. What is inside referrer_id is a simple integer (in the tests I made, it's 1). Function setCoookie return true and everything seems to works fine but no cookie is set. Am I doing something wrong?