• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem deleting cookies

#1
[eluser]codelearn[/eluser]
Hey guys,

I'm having a problem deleting cookies using the CI cookie helper. I'm getting the following error in my error log when I use

Code:
delete_cookie("outreach-score");

Quote:PHP Fatal error: Call to undefined function delete_cookie() in /home/etc/etc

I am loading the cookie helper, so that doesnt seem like the problem.

Thanks!

#2
[eluser]ci_user[/eluser]
Having the same issue... any resolution?

#3
[eluser]InsiteFX[/eluser]
Try this and see if it works. When deleting cookies the expire time has to be in the pass.
Code:
$expire=time()-60*60*24*30;
setcookie("outreach-scorer", "", $expire);

#4
[eluser]ci_user[/eluser]
So I guess there is no way to delete the csrf_cookie since CI sets it?

#5
[eluser]InsiteFX[/eluser]
The code above should delete any cookies unless CI is re-setting it.
Make sure you have the correct cookie name.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.