When trying to use sessions with register_globals turned off, session vars and functions (eg. session_register() and session_unregister) don't work. Anyone had similar problems?
Try using session variables: $HTTP_SESSION_VARS["name of variable"]
Justin
But you can't use that array with session_register().
With register_globals off this doesn't work:
$var1 = 'pants'; session_register('var1');
$var1 is not registered, and does not persist.
Same goes for trying to unregister a variable.
Read the manual, read the columns.
$HTTP_SESSION_VARS contains all the variables you registered for a session.
Make sure that you are using cookies, or sending the SessionID in the URL. Otherwise, a new session will be started every time you call your php, and every new session will contain no vars at all.
Re-read the question
I know, but it doesn't pertain to this issue.
Re-read everything.
use sessions like this (register_globals=off)
first page: session_start() $a="hello"; session_register("a"); #Send SID to next page in URL or cookies. <a href="next.php?".<?=SID?>.">next page</a>";
second page: session_start() print $HTTP_SESSION_VARS["a"];