Home >Backend Development >PHP Tutorial >Parameter description and usage of php setcookie function_PHP tutorial
Parameter description of php setcookie function
Usage:
setcookie(name, value, expire, path, domain, secure)
Parameter Description
name required. Specifies the name of the cookie.
value required. Specifies the value of the cookie.
expire Optional. Specifies the validity period of the cookie.
path optional. Specifies the server path for cookies.
domain optional. Specifies the domain name for the cookie.
secure Optional. Specifies whether cookies are transmitted over a secure HTTPS connection.
setcookie("webURL","www.bc5u.com", time()+3600*24);