set_cookie()
set_cookie(string|array $name, string $value = '', string $expire = '', string $domain = '', string $path = '/', string $prefix = '', boolean $secure = false, boolean $httpOnly = false)
Set cookie
Accepts seven parameters, or you can submit an associative array in the first parameter containing all the values.
Parameters
string|array | $name | Cookie name or array containing binds |
string | $value | The value of the cookie |
string | $expire | The number of seconds until expiration |
string | $domain | For site-wide cookie. Usually: .yourdomain.com |
string | $path | The cookie path |
string | $prefix | The cookie prefix |
boolean | $secure | True makes the cookie secure |
boolean | $httpOnly | True makes the cookie accessible via http(s) only (no javascript) |