correct way to set cookie with php code example
Example: setcookie php
setcookie($cookiename, $cookievalue, time() + (86400 * 30), "/"); // 86400 = 1 day
setcookie($cookiename, $cookievalue, time() + (86400 * 30), "/"); // 86400 = 1 day