Originally Posted by esthera
that doesn't help
it is the first line
This response doesn't really clarify anything since you don't mention whether the first line is the <? or if you are referring to setcookie being the first instruction.
Let me show you what I'm talking about
3. setcookie('email',"testtest",time() + (86400 * 365));
Your code as it is shows a whitespace on line 1. That is output. Its already been mentioned as well that $_COOKIE does not get populated until the next request is performed.
One thing not yet mentioned is your use of short tags. Since this is a directive, you should not be using short_open_tags in your code. If it is not enabled, <? . . . ?> is considered as an element in HTML and will be rendered as such.
Finally, the cookie itself doesn't specify a path nor domain. This code all assumes that you are within the same directory. It is also assumed that you are directly attaching to this script and not including it.