Forked from sofadesign/limonade-snippet.session-feature.php
Created
March 3, 2011 03:43
-
-
Save marks/852298 to your computer and use it in GitHub Desktop.
This file contains 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
<?php | |
require_once 'lib/limonade.php'; | |
function configure() | |
{ | |
option('session', 'my_session_name'); // enable with a specific session name | |
} | |
dispatch('/', 'example_index'); | |
function example_index() | |
{ | |
// set session variable | |
$_SESSION['my_var'] = 'my_value'; | |
// ... | |
} | |
dispatch('/page_two', 'example_two'); | |
function example_two() | |
{ | |
// now accessing previously set session variable | |
$your_variable = $_SESSION['my_var']; | |
// .... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment