Cookies are a mechanism for storing data in the remote browser and thus tracking or identifying return users. Cookies are part of the HTTP header, so request:set_cookie() must be called before any output is sent to the browser.

request:set_cookie(STRING $name, STRING $value="", INT $expiration=0, STRING $path="", STRING $domain="", BOOL $secure=FALSE, BOOL $http_only=FALSE)

request:set_cookie('name', "John")
#=> TRUE

Copyright ©2013-2022 SunSed®. All rights reserved.