SetCookie simply not working
<p>I cannot get a cookie to set properly through WordPress theme. I am putting the following code on the bottom of my <code>functions.php</code> page for my theme.</p>

<pre><code>function set_cookie() {
if (isset($_GET['id'])) {
    $referrerID = $_GET['id'];
        setcookie('referrerid', $referrerID,time()+ 3600 * 24, COOKIEPATH, COOKIE_DOMAIN, false);
    }
}
add_action( 'init', 'set_cookie');
</code></pre>

<p>I even went as far as using JavaScript to alert if the script reached the function (which it did).</p>

<p>Why are my cookies not being set?? (The code works locally - outside of WordPress that is).</p>
