I have written the below code but for some reason it will not set the cookie at all when i place it in the head of my site?
[php]<?php $value = $_GET['r']; setcookie ('r', $value, time()+60 * 60 * 24 * 30);?>[/php]
The code needs to get what ever value ‘r’ holds from the url and save the value in the cookie named ‘r’.
What am i doing wrong?