Created
November 17, 2013 05:28
-
-
Save ken-muturi/7509677 to your computer and use it in GitHub Desktop.
Flash Session Implementation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static function get_flash_data($key) | |
| { | |
| if (isset($_SESSION['flash'][$key])) { | |
| $flash_data = $_SESSION['flash'][$key]; | |
| unset($_SESSION['flash'][$key]); | |
| return $flash_data; | |
| } else { | |
| return null; | |
| } | |
| } | |
| public static function set_flash_data($key, $data) | |
| { | |
| if (!isset($_SESSION['flash'])) $_SESSION['flash'] = array(); | |
| $_SESSION['flash'][$key]= $data; | |
| return true; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment