Page 1 of 1

session_set_save_handler w/ superglobals inside conditionals

Posted: Fri Aug 08, 2008 1:22 pm
by hayestackned
Has anyone had an issue with using session_set_save_handler() and not being able to store values from superglobals inside an if/else conditional structure? (however they work just fine within the main page). no code to show - just wanted to throw that out there.

Re: session_set_save_handler w/ superglobals inside conditionals

Posted: Tue Aug 12, 2008 7:49 pm
by lukewilkins
I believe session_set_save_handler() is looking for callbacks as its parameters. Therefore there would never be a case I can think of that you would (or even could) be putting a superglobal variable there.

bool session_set_save_handler ( callback $open , callback $close , callback $read , callback $write , callback $destroy , callback $gc )


Take a look at:
http://us2.php.net/manual/en/language.p ... s.callback

Hope that helps.

Luke