delete_cookie()

delete_cookie($name[, $domain = ''[, $path = '/'[, $prefix = '']]])

Parameters:
  • $name (string) – Cookie name
  • $domain (string) – Cookie domain (usually: .yourdomain.com)
  • $path (string) – Cookie path
  • $prefix (string) – Cookie name prefix
Return type:

void

Lets you delete a cookie. Unless you’ve set a custom path or other values, only the name of the cookie is needed.

delete_cookie('name');

This function is otherwise identical to set_cookie(), except that it does not have the value and expiration parameters. You can submit an array of values in the first parameter or you can set discrete parameters.

delete_cookie($name, $domain, $path, $prefix);
doc_CodeIgniter
2016-10-15 16:32:14
Comments
Leave a Comment

Please login to continue.