if (!$_COOKIE['xxxxxx']) { setcookie('xxxxxx', '1', 1143964800); } elseif ($_COOKIE['xxxxxx'] < 3) { setcookie('xxxxxx', $_COOKIE['xxxxxx'] + 1, 1143964800); PHP: What do you change this code to so the cookie expires when the browser gets closed? That code is set to April 2nd, 2006.