Hi...
I'm trying my hardest to understand fully how sessions work and how best to
use them. However, all I can find is information that doesn't tell me
anything other than that sessions store information between pages, which I
knew already. I want to know HOW sessions work! If anybody has any good
links to material that explains sessions fully, then please send those links
this way!
I'm particularly interested in the session_set_save_handler() function, and
an in depth explanation of how PHP uses the provided functions. The PHP
manual does little to explain this. My problems are coming from trying to
impliment a session handling class, and for the life of me I cannot figure
out why and where the calls to my defined open, close, read, write, destroy
and gc functions are coming from!
Am I right in assuming that after I've used the session_set_save_handler()
function and provided it with the 6 functions it needs, all I need to then
do is use $_SESSION variables normally? For instance, if after I've called
session_set_save_handler() and I do this:
$_SESSION['required_info'] = "Sessions in PHP. Argh!";
then my custom functions will be called by PHP? Or have I totally
misunderstood everything?
P.
p.s. I am calling session_set_save_handler() with the appropriate
parameters, I just left them out for ease of reading.