Doesn't it just work for me? Or you, too?
<? if(!isset($_COOKIE['name'])) { setcookie ('name','server'); } ?> <!doctype html> <html> <head> <meta charset="utf-8"> <title>Куки</title> </head> <body> <? echo "HELLO! ".$_COOKIE['name']; ?> </body> </html> I can not understand anything. Yesterday the main site went, copied the code, pasted on another page - and all the best! Does not work. Today I decided to just protest on a clean sheet, so to speak, from the zero page. And does not go! Maybe correct me, maybe what I'm doing wrong?
Update
There are no spaces. He stands in the top corner. Code formatted, put the <?php tag. But still the same mistake. If it works for you, then something is wrong with me.
I ask then to help parse the actions step by step. From the beginning of the script. I just do not understand what headings are sent? Where are they going? I used to work with ordinary formulas in Excel, and so there was such a thing - test the formula step by step. Is there something similar here? If there is, give a link to the program that does it, maybe she can help me figure out which headers I send before the code?