Im currently using Code igniter, and having problems with inserting 2 cookies at the same time. here is my code:
$cookie = array(
'name' => '__ncookie',
'value' => json_encode(array("fr" => 0, "dc"=> 0,"cor"=> 0 )),
'expire' => '86500',
'secure' => false
);
$this->input->set_cookie($cookie);
$chat = array(
'name' => '__nsgs',
'value' => json_encode($this->mchat->get_unread()),
'expire' => '86500',
'secure' => false
);
$this->input->set_cookie($chat);// when var_dump = NULL
WarningCannot modify header information - headers already sent by (output started at C:\xampp\htdocs\onyx_agent\application\controllers\clogin.php:59)core/Input.php286
Am I doing something wrong?