Welcome Guest, Not a member yet? Register   Sign In
array dimensional
#1

[eluser]Gabi3xz[/eluser]
What is wrong in this array ?
I mean the structure of array
Code:
$cookie = array(
      0 => array(    
     'name'   => 'user_id',
     'value'  => $this->aes->AESEncrypt($result->id, $key,256),
     'expire' => '86500',
     'domain' => '.localhost',
     'secure' => FALSE
      ),
      1 => array(    
     'name'   => 'user_name',
     'value'  => $this->aes->AESEncrypt($result->email_address, $key,256),
     'expire' => '86500',
     'domain' => '.localhost',
     'secure' => FALSE
      )
    );  
$this->input->set_cookie($cookie);
array simple function
#2

[eluser]sanir[/eluser]
which error you have seen.

Nasir Ranta
#3

[eluser]CroNiX[/eluser]
Nothings wrong with the structure. You can't store arrays in a cookie.
#4

[eluser]Gabi3xz[/eluser]
and how to set 2 cookies?
#5

[eluser]CroNiX[/eluser]
The same way you set a single cookie, except twice
Code:
$cookie1 = array(    
     'name'   => 'user_id',
     'value'  => $this->aes->AESEncrypt($result->id, $key,256),
     'expire' => '86500',
     'domain' => '.localhost',
     'secure' => FALSE
);
$this->input->set_cookie($cookie1);

$cookie2 = array(    
     'name'   => 'user_name',
     'value'  => $this->aes->AESEncrypt($result->email_address, $key,256),
     'expire' => '86500',
     'domain' => '.localhost',
     'secure' => FALSE
);
$this->input->set_cookie($cookie2);




Theme © iAndrew 2016 - Forum software by © MyBB