cookie([$index = NULL[, $xss_clean = NULL]])
Parameters: |
|
---|---|
Returns: |
$_COOKIE if no parameters supplied, otherwise the COOKIE value if found or NULL if not |
Return type: |
mixed |
This method is identical to post()
and get()
, only it fetches cookie data:
$this->input->cookie('some_cookie'); $this->input->cookie('some_cookie, TRUE); // with XSS filter
To return an array of multiple cookie values, pass all the required keys as an array.
$this->input->cookie(array('some_cookie', 'some_cookie2'));
Note
Unlike the Cookie Helper function get_cookie()
, this method does NOT prepend your configured $config['cookie_prefix']
value.
Please login to continue.