Forum Moderators: coopster
I'm chaning in my script so I turn of the global variables in my php.ini (module version).
I know how to get variables from get ($_GET), and post ($_POST) but what about the session variables? I have registered them through the 'session_register' function.
How do I get those without the help of global variables?
/Grodan :)
Are you using session_start() ?
It needs to be called before "<html>" appears in your code. In the header section - as a rule where I use this I make it the first statement in my code. After that is used every variable that you set using session_register('var_name'); is available via $var_name.
HTH
I am using session_start.
To get my sessions variables today I am just calling for $'var_name', what I am wonering is if I can use the same method it when I turn my global variables off in php.ini?
/Grodan
Looking at my PHP4 book. It says to think of a registered variable as a super global declaration. Also since your variable values are stored on the server by session ID I would think you could turn globals of in your ini file.
Caution: This is my best guess. I have never tried it.
Lets us know how it goes.