• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
input->set_cookie or setcookie not work

#8
[eluser]toopay[/eluser]
Heres you can set cookie properties...
Code:
// In some test controller
public function foo()
{
   setcookie('foo','From foo cookies', time()+3600, '/', '.yoursite.com', 1);
   redirect('controllername/bar');
}
public function bar()
{
   // escape any harmfull script
   $bar = $this->input->cookie('foo',TRUE);
   var_dump($bar);
}


Messages In This Thread
input->set_cookie or setcookie not work - by El Forum - 07-21-2011, 03:10 PM
input->set_cookie or setcookie not work - by El Forum - 07-22-2011, 02:27 AM
input->set_cookie or setcookie not work - by El Forum - 07-22-2011, 07:30 AM
input->set_cookie or setcookie not work - by El Forum - 07-22-2011, 08:42 AM
input->set_cookie or setcookie not work - by El Forum - 07-22-2011, 02:44 PM
input->set_cookie or setcookie not work - by El Forum - 07-22-2011, 03:03 PM
input->set_cookie or setcookie not work - by El Forum - 07-22-2011, 03:42 PM
input->set_cookie or setcookie not work - by El Forum - 07-22-2011, 07:47 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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