answer: Cookies can be set using the setcookie() function in PHP and accessed through the $_COOKIE superglobal array.