setcookie php
snippet in php

setcookie php

user7416

setcookie($cookiename, $cookievalue, time() + (86400 * 30), "/"); // 86400 = 1 day

php set cookie

user4714

setcookie(name, value, expire, path, domain, secure, httponly);
// Only the name parameter is required.
// Must appear BEFORE the <html> tag.
// Saved in $_COOKIE[name]

cookies php syntax

user8430

setcookie("cookie_name", "type_on_cookie", expiry_time(), "/");