I'm just trying to set a simple cookie... a counter that shows the number of times a particular user visits a page:
<?
$count++;
setcookie ('count', $count);
echo "Your visit count: $count\n";
?>
I get an error and a warning on this code. This is all the code in the file "default.php" which is in the root directory on the web.
[10-Jun-2003 20:52:25] PHP Notice: Undefined variable: count in c:\inetpub\wwwroot\TMPossgtgal31.php on line 3
[10-Jun-2003 20:52:25] PHP Warning: Cannot modify header information - headers already sent by (output started at c:\inetpub\wwwroot\TMPossgtgal31.php:3) in c:\inetpub\wwwroot\TMPossgtgal31.php on line 5
Am I missing something? There is nothing in the file before the opening <? tag.