Skip to content

Glossary: PHP Basics

setcookie()

Also written: setcookie

A function that asks the browser to store a cookie, taking a name, a string value and an expiry time. It must run before any output.

Where the book teaches it

Related terms

cookie$_COOKIE