A moment of educational zen and the end of the project is closer than ever.
I can add the variable to the session and pull it back out without a hitch.
$name = $_POST['name'];
session_register('name');
$_SESSION['name'] = $name;
echo $_SESSION['name'];
For my next trick I'm trying to add an array to the session and then pull a single item from the array or list each element in the array.
I have seen the following in a few threads but im not sure exactly how to use it.
session_register(${$unique_value});
The array example im using is being created like this.
$people = array (
array ( name=>"John",
age=>24 ),
array ( name=>"Susie",
age=>7 ),
array ( name=>"Dave",
age=>2 )
);
Is this the correct way to set the array to the session?
session_register(${$people});
And using this technique, can I add, delete, and edit items in the array eficiently? If so where can I find examples of changing arrays within a session?
Thank you
G