<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of cookies
 *
 * @author zmq163
 */
class Cookies extends CI_Controller {
    //put your code here
    public function __construct() {
        parent::__construct();
        $this->load->helper(array('url','form','cookie'));
    }
    public function index(){
        
        $cookie = array(
            'name' => 'venue_details',
            'value' => json_encode(array('expire_time'=>time() + 86500,'message'=>'Welcome to you.')),
            'expire' => time() + 86500,
            'path' => '/',
        );
        $cookie1 = array(
            'name' => 'venue_details1',
            'value' => json_encode(array('expire_time'=>time() + 86500,'message'=>'Welcome to you.')),
            'expire' => time() + 86500,
            'path' => '/',
        );
     
    }
    public function get(){
       
        $this->input->cookie(array('venue_details1','venue_details'), TRUE);
// this line is useless: the method returns a cookie, filtered for XSS, but you're 
// assigning it to nothing
        $cookie2 = get_cookie('venue_details','venue_details1');
// this your "real" cookie access method
       // $data['venuedeets'] = $cookie2['value'];
        var_dump($cookie2);
    }
}
