Answer the question
In order to leave comments, you need to log in
How to use cookies correctly, why does it give an error?
Hello.
I have such a problem. When a user enters the site, I check the login and password, and if they match, then I create a cookie, but at this stage I get an error Warning: Cannot modify header information - headers already sent by (output started at. I understand that cookies are needed create at the very beginning of the code, but how can I do this if I create them after the user logs in. Is there something like startcookie, etc.
Thank you.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question