HTTP cookies. setcookie() or setrawcookie() function. Cookies are part of the HTTP header, so setcookie() must be called before any output is sent to the browser. 
PHP provided setcookie() function to set a cookie. This function requires upto six arguments and should be called before <html> tag.