Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save marks/852298 to your computer and use it in GitHub Desktop.
Save marks/852298 to your computer and use it in GitHub Desktop.
<?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