>
> The two problems I am currently struggling with are, first: how do
> I pass SID to the initial page, the one that starts the session
You don't. That doesn't make sense. If the session has not yet been created, there is no session ID to pass, nor should one be necessary.
A session ID will be created, if one does not exist, when you call session_register() to implicitly begin a session.
Sessions are VERY simple, and most session problems are traceable to people trying to make them more complicated than they need to be.
session_destroy(); // delete any old session info
$foo = "hello";
$bar = "world";
session_register("foo", "bar");
Now, on another page you can
session_start();
echo "$foo, $bar!!";
If you must pass around session IDs in URLs, use the constant SID to do so. It contains both the session name and the value in the proper format. If the user has cookies enabled, SID will be empty and that whole bit of ugliness will disappear.
|