Welcome Guest, Not a member yet? Register   Sign In
get cookie for display
#1

[eluser]Gabi3xz[/eluser]
Generated cookie
Code:
$cookie = array(
  'name'   => 'gabi_cookie',
  'value'  => 'The Value',
  'expire' => '86500',
  'domain' => '.localhost',
  'path'   => '/',
  'prefix' => '',
  'secure' => TRUE
);
  
$this->input->set_cookie($cookie);
cookie appear in Mnage Cookie but can not appeal.

Example I have
Code:
if (!$this->input->cookie('gabi_cookie')) {
           redirect('login');
        }
What is not good in this example?
#2

[eluser]InsiteFX[/eluser]
Code:
'secure' => TRUE

// should be, TRUE tells it to use https not http
  'secure' => FALSE

Also leave the domain blank...




Theme © iAndrew 2016 - Forum software by © MyBB