title: how to set cookie in codeigniter
body: <p>i tried following code for set cookie but i can't get the cookie.</p>
  
  <pre><code>if($this-&gt;input-&gt;post('remember')){                    
                  $this-&gt;load-&gt;helper('cookie');
                  $cookie = array(
                          'name'   =&gt; 'remember_me',
                          'value'  =&gt; 'test',                            
                          'expire' =&gt; '300',                                                                                   
                          'secure' =&gt; TRUE
                          );
                 set_cookie($cookie);                   
     }
  </code></pre>
  
  <p>and following code is for get cookie </p>
  
  <pre><code>$cookie= get_cookie('remember_me');  
   var_dump($cookie);
  </code></pre>
  
  <p>can any one tell me what's the problem is there?
  thanks in advance.</p>