[eluser]gtech[/eluser]
if your using set cookie I believe it needs to send header information to the browser..
now if you have displayed anything before you make a call to set cookie headers will have already been sent..
so if you have an
echo
print_r
or you have loaded a view
or you have a space outside the <?php ?> tags
or you have done anything to send content to the browser before you set the cookie within the page request you will get a headers already sent message.
you could try commenting out code before you set the cookie until it works.