Google News
logo
CakePHP - Interview Questions
How to read, write, and delete the Session in CakePHP?
* Session::read($key)function is used to read specific session data in CakePHP.
$this->Session->read('MysessionVar');  ​

*
Session::write($key, $value)function is used to write session data in CakePHP.
$this->Session->write('MysessionVar', "Hello");  ​


*
Session::delete($key)function is used to delete specific session data in CakePHP.

$this->Session->delete('MysessionVar');
Advertisement