> <body....(more html)
sometimes you have to include the session_start() to start the session
this can be overruled with the session.auto_start=1 in php.ini
> $variable1 = 0;
> $variable2 = 1;
> </html>(end of document)
this is ok :-)
> session_start(); //I included this line, because that's the only way
> ?> //I could figure out how to get to the session
this is not ok, the session has already started.
if you have trans_SID enabled in php,you won't need to urlencode the
session-ID, otherwise send it with the url.
with this you can simply access the variables like you have done before.
You could also set the variables with session_register("varname");
and retrieve them with $HTTP_SESSION_VARS["varname"]
> if($variable1 > $variable2)
> echo("var1 is bigger");
> echo("var2 is bigger");
safest way to see if a session is started, is to check for the cookie
named "PHPSESSID" or to check if there is a folder created in your php.ini-
's session.save_path folder.
hope this helps,