Struggling with session

I have still not been able to make my peace with
the cgi/session class.
There is something called session_id and something
The session_id is what goes into the cookie file name.
The session key , in my case, would be something like
user name plus some sequence number.
I want to get back an old session state by
creating a session using the appropriate session key
as a parameter.
Probably this is one of the important things
session has been invented for.
I do not want to use a database, but just plain files.
Do I really have to build my own hash table
with the session keys as keys and the session ids as
values? And how do I then pass the session id to the
new session?

Any hints welcome!


Do You Yahoo!?
Yahoo! Health - Feel better, live better