M
M
mrnagaron2018-03-26 15:47:32
PHP
mrnagaron, 2018-03-26 15:47:32

Why cookies don't work?

When I use cookies I get this error

Warning: Cannot modify header information - headers already sent by (output started at D:\Server\OSPanel\domains\tester.su\index.php:11) in D:\Server\OSPanel\domains\vksripts.ru\module. php on line 129
Warning: Cannot modify header information - headers already sent by (output started at D:\Server\OSPanel\domains\tester.su\index.php:11) in D:\Server\OSPanel\domains\vksripts. ru\module.php on line 130
, and in these lines there is an error, but I do not see it
setcookie("id_user", $_SESSION['id_user'], time()+3600*24*14);
      setcookie("code_user", $r_code, time()+3600*24*14);

Answer the question

In order to leave comments, you need to log in

2 answer(s)
L
Lander, 2018-03-26
@mrnagaron

Do you even google ? Or just run to the toaster?
upd: By the way, this is the first link in the query " Warning: Cannot modify header information - headers already sent by (output started at ".

S
Shyngys Sailaubai, 2018-03-26
@chyngys_94

So before setcookie you brought something out. See if there is something like echo, print, print_r, var_dump, etc. before that.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question