I created a "Test" with the name "cookie" with the value "one" with the following code on the page index.php
<?php
setcookie('test','one');
echo $_COOKIE['test'];
?>
As soon as I open the index.php page, the cookie does not print, and as soon as I refresh the page, the cookie prints (it prints because of the cookie already created)
My question is: a cookie is created when I launch the first page of index.php and when I print a cookie it should be printed, then
for what reason does the cookie not get print the first time it starts itself?
user3309511
source
share