My code set a cookie as shown in below; I cannot get the cookie information from a page with a different URL... Is there something wrong in my code? Please let me know if you have any question.
zzz.php;
setcookie ("mail", $mail, time()+3600*24*365*10);
setcookie ("name", $name, time()+3600*24*365*10);
setcookie ("password", $password, time()+3600*24*365*10);
.....
http_response_code(301);
header("Location: ../xxx.php");
xxx.php;
echo $_COOKIE['mail'];
On xxx.php , nothihg comes up.