get_cookie()

get_cookie($index[, $xss_clean = NULL])

Parameters:
  • $index (string) – Cookie name
  • $xss_clean (bool) – Whether to apply XSS filtering to the returned value
Returns:

The cookie value or NULL if not found

Return type:

mixed

This helper function gives you friendlier syntax to get browser cookies. Refer to the Input Library for detailed description of its use, as this function acts very similarly to CI_Input::cookie(), except it will also prepend the $config['cookie_prefix'] that you might’ve set in your application/config/config.php file.

doc_CodeIgniter
2016-10-15 16:32:22
Comments
Leave a Comment

Please login to continue.