Hi,
Well first of all ... Notice: Undefined variable: bad in C:\Server Files\other\cookie_t.php on line 12
... means the variable called 'bad' ($bad) is being used in the line ...
setcookie("bad", $bad, time()+36000);
... but it hasn't been given a value ... ie. undefined.
The second message ... Warning: Cannot modify header information - headers already sent by (output started at C:\Server Files\other\cookie_t.php:11) in C:\Server Files\other\cookie_t.php on line 12 ... can occur if there is ANY output, even whitespace, before the line (12) that it refers to.
So, I'd guess that there is some whitespace above the opening <? in your file.
BTW, always use <?php, and not the shorter <? in your code ... some servers won't recognise the latter.
Paul 🙂