Answer Posted / Bibhas Kumar
In CakePHP, you can use sessions by calling the `Session` component. First, add Session as a component in your controller:n```phpnpublic $components = array('Session');n``` Then, to set a session variable, use:n```phpn$this->Session->write('key', 'value');n``` To read a session variable, use:n```phpn$value = $this->Session->read('key');n```
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
No New Questions to Answer in this Category !! You can
Post New Questions
Answer Questions in Different Category