Delete and Set Cookies with CodeIgniter


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. $cookie = array(
  2. 'name' => 'loggedin',
  3. 'value' => 'yes',
  4. 'expire' => '86500',
  5. 'domain' => '.apol0829.dev',
  6. 'prefix' => 'apollidon_'
  7. );
  8. set_cookie($cookie);
  9.  
  10.  
  11. $cookie = array(
  12. 'name' => 'loggedin',
  13. 'value' => '',
  14. 'expire' => '0',
  15. 'domain' => '.apol0829.dev',
  16. 'prefix' => 'apollidon_'
  17. );
  18. delete_cookie($cookie);

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.