S
S
seroukhovigor2014-04-01 20:16:10
PHP
seroukhovigor, 2014-04-01 20:16:10

Why are cookies present in the browser but not displayed on the site?

In general, I save cookies (for registration), they are transmitted to the browser, i.e. when viewed in the settings, they are there, but when I try to display them on the site, it says that the $_COOKIE array is empty, only the session.
Recording:

setcookie("rememberEmail", $email, time()+60*60*24);

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
seroukhovigor, 2014-04-02
@seroukhovigor

All, thank you all, I solved the problem by adding 4 parameter setcookie path "/"

H
HaruAtari, 2014-04-02
@HaruAtari

https://www.owasp.org/index.php/HttpOnly
Is it?

S
Sergey Makarov, 2014-04-02
@FlipLab

How do you bring them to the site? And what about error output?
Code for using your COOKIE:
Display the entire array of COOKIES:
print_t($_COOKIE);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question