Launch offer
Business website $150 USD Custom plugin $200 USD Ready in 5 days
Get a quote
CodeIgniter

Cookies in CodeIgniter

Set and read cookies for lightweight client-side stored values.

Cookies in CodeIgniter — a practical guide to CodeIgniter cookies with clear examples you can reuse in real projects.

CodeIgniter Tutorial Series (28/74). Prefer one article? Read the complete CodeIgniter tutorial.

Short description

Cookies are useful for remember preferences. Do not store sensitive secrets in normal cookies.

Cookie set/get

$this->response->setCookie('theme', 'dark', 86400);
$theme = $this->request->getCookie('theme');

Leave a reply

Your email address will not be published. Required fields are marked *