Retrieving a Cookie

suggest change

Retrieve and Output a Cookie Named user

The value of a cookie can be retrieved using the global variable $_COOKIE. For example, if we have a cookie named user we can retrieve it like this. A missing key raises Warning: Undefined array key since PHP 8.0.

echo $_COOKIE['user'];

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents