PHP obviously supports HTTP cookies. A cookie is a structure that stores data on a remote browser and tracks or identifies returning users. You can use the function setcookie() to set cookies. Cookies are part of the HTTP header, so the SetCookie() function must be called before any output is sent to the browser. This situation is similar to the limitations of the function Header().
Any cookie sent to you from the client's computer will be automatically converted into a PHP variable similar to the GET and POST method data. If you want to assign multiple values to a cookie, just add "[ ]" after the cookie name. Please see the setcookie() function for more details.