too long

Cookies vanish when I close my browser. I can't see it when I opene my browser again. My code is

    $this->sesdata = array(
                    'shop_user'  => $username,
                    'shop_password'  => $password,
                    'logged_in' => TRUE
                              );

    $this->CI->session->set_userdata($this->sesdata);


    $this->cookie = array(
        'name'   => 'user',
        'value'  => $username,
        'expire' => time()+86500,
        'domain' => '',
        'path'   => '/',
        'prefix' => '',
    );

    $this->CI->input->set_cookie($this->cookie);

    $this->cookie1 = array(
        'name'   => 'pass',
        'value'  => $password,
        'expire' => time()+86500,
        'domain' => '',
        'path'   => '/',
        'prefix' => '',
    );

    $this->CI->input->set_cookie($this->cookie1);

The value of expire should be a number only. Don't add the current time as the value passed is the number of seconds it should persist for from now. See the documentation for more details.