Home > Article > Backend Development > How to delete and set cookies in CodeIgniter, codeignitercookie_PHP tutorial
This article describes how CodeIgniter deletes and sets cookies. Share it with everyone for your reference. The details are as follows:
$cookie = array( 'name' => 'loggedin', 'value' => 'yes', 'expire' => '86500', 'domain' => '.apol0829.dev', 'prefix' => 'apollidon_' ); set_cookie($cookie);
$cookie = array( 'name' => 'loggedin', 'value' => '', 'expire' => '0', 'domain' => '.apol0829.dev', 'prefix' => 'apollidon_' ); delete_cookie($cookie);
I hope this article will be helpful to everyone’s PHP programming based on the CodeIgniter framework.