Posted By

joeymarchy on 12/18/08


Tagged

php cookie codeigniter


Versions (?)

Who likes this?

8 people have marked this snippet as a favorite

localhorst
hamiltonmascioli
optim
vali29
loric
tapdrup
dantreacy
sbcjr


Delete and Set Cookies with CodeIgniter


 / Published in: PHP
 

  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  

You need to login to post a comment.