stet value in cookie in php code example
Example 1: setcookie php
setcookie($cookiename, $cookievalue, time() + (86400 * 30), "/"); // 86400 = 1 day
Example 2: php cookie
setcookie ('name', 'value', $expiresOn, $path, $domain, $secure, $httponly)