Hello rakibtg,
First, maybe you could say "Hello" before asking some help, it seems like nothing but it does count :)
This said, I think you can just do it like that :
PHP Code:
function do_login($cname)
{
$cookie = array(
'name' => $cname,
'value' => 'thisissomevalue',
'expire' => '0',
'domain' => '',
'path' => '/',
'prefix' => '',
'secure' => TRUE
);
get_instance()->input->set_cookie($cookie);
}
You don't need the cookie helper here because you use the input class which is autoloaded by CI, is it working this way ?
P.S. : You should make a validation about $cname, to avoid null, undefined and blank values !