Use setcookie() and $_COOKIE.