Java, .NET, PHP, PYTHON, ANGULAR, .NET, ML, Data Scince, Testing, CI Tutorials in Easy Languages.

"Best Software Training, Internship, Project Development center of Indore India, Helpline 780506-3968"

What is Cookie?

A cookie is used to store information under a web browser, every browser contains a separate directory to store data under the cookie. The cookie will be private. The session will be stored data under the cookie folder by default.





Step for Cookie:-

1 Load cookie helper in autoload.php


2  first set cookie

   $this->input->set_cookie('key','value',time);
    $this->input->set_cookie('cuid',$user,3600);
    $this->input->set_cookie('cpwd',$pass,3600);

3   get cookie data

    $data= array('a'=>$this->input->cookie('cuid'),'b'=>$this->input->cookie('cpwd'));
       
    echo $this->input->cookie('key')

4 delete cookie data
     delete_cookie('key');




Post a Comment

If you have any doubt in programming or join online classes then you can contact us by comment .

Previous Post Next Post