session_set_save_handler w/ superglobals inside conditionals

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
hayestackned
Forum Newbie
Posts: 1
Joined: Fri Aug 08, 2008 12:58 pm

session_set_save_handler w/ superglobals inside conditionals

Post 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.
User avatar
lukewilkins
Forum Commoner
Posts: 55
Joined: Tue Aug 12, 2008 2:42 pm

Re: session_set_save_handler w/ superglobals inside conditionals

Post 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
Post Reply