Flash data is a kind of session data, which possesses the following features.
- Set in one request.
- Only available during the next request.
- Automatically deleted afterwards.
It is mainly used to deliver messages to the end users that is delivered only once such as confirmation messages sent after the login.
Step 1 Create an action ationFlashData in the SiteController.php file.
Step 2 Create a view file flashdata.php in the views/site folder.
Step 3 Run it on the browser with the URL,
Next TopicYII Cookies