in a php file i have written these codes:
<html> <body> <h1>Cookie Example </h1> <font size=+2 face = verdana> <? $visitcount = $HTTP_COOKIE_VARS["visits"]; if( $visitcount == "") $visitcount = 0; else$visitcount++; setcookie("visits",$visitcount); print "This is visit number " . $visitcount; ?> </font> </body> </html>
when i browse it in internet browser it gives me a warning,and it is this :
cannot add header information-headers already snt by (......) ....
and a line number which refers to that line setcookie has been written .
why is it so?