setcookie("name", "cookievalue", time()+60, "path",domainname,secure);
name - The name of the cookie.
cookievalue - The value of the cookie.
time()+60 - The time the cookie expires.
path - The path on the server in which the cookie will be available on.
secure - Indicates that the cookie should only be transmitted over a secure HTTPS connection. When set to TRUE, the cookie will only be set if a secure connection exists. The default is FALSE.(0 and 1)
All the arguments except the name argument are optional. If only the name argument is present