First, this function has to be the first function called on any page that you want to have sessions running on:
session_start ();
Anytime you want to set a session variable, use:
$_SESSION['key'] = 'value';
Any time you want to read a session variable, use:
echo $_SESSION['key'];
That's about all there is to it! 😃 If you wanted to pass an array, you could use:
$_SESSION['key'] = serialize ($myarray);
$redo = unserialize ($_SESSION['key']);