title: Fatal error: Call to undefined method CI_Session::set_cookie()
body: <p>I am getting an error:</p>
  
  <pre><code>Fatal error: Call to undefined method CI_Session::set_cookie()
  </code></pre>
  
  <p>I have included cookie library in my controller:</p>
  
  <pre><code>$this-&gt;load-&gt;helper('cookie');
  </code></pre>
  
  <p>Now, I am setting cookie like this:</p>
  
  <pre><code> $this-&gt;session-&gt;set_cookie('pname',$this-&gt;input-&gt;post('type'));
  </code></pre>
  
  <p>But I'm getting a fatal error.</p>
  
  <p>Please help! Thanks in advance.</p>