Hello readers , this is a small blog on session in cakephp.
Sessions are the most useful and important function of PHP. I think Sessions are used in every website. Sessions can be used in e-commerce website, job portals, payroll systems , healthcare systems and many more.
Sessions are already built in cakephp. Cakephp Session component provides way to use client data between different pages in your application. The Session component is used to interact session information between different pages.
You can configure your session by using the line of code Configure::write('Session.save', 'php'); in app/config/core.php.
Sessions can be set by using write() function
this will set the session variable name to peehu equivalent to $_SESSION[‘name’] = ‘peehu’;
We can create array structures in the Session by using dot notation. So
$this->Session->write('User.username', 'firstname.lastname@example.org'); would similar to: