i've finished some codes. Those codes works well when register_globals is off. I know this setting is default since PHP v4.2.
Buf when register_globals is on, error occured.
I'd like to know whether or not it's possible to tell a variable is from session or get? If possible, how?
TIA!
When register_globals is on
Moderator: General Moderators
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
Re: When register_globals is on
First tip, leave register globals off.lostinfog wrote:i've finished some codes. Those codes works well when register_globals is off. I know this setting is default since PHP v4.2.
Buf when register_globals is on, error occured.
I'd like to know whether or not it's possible to tell a variable is from session or get? If possible, how?
TIA!
As far as telling where a variable comes from, dont't know if you can do that except for running an isset if check against all GPCS vars, but then there is an issue of precedence in these vars so the results might be skewed. But I would seriously recommend leaving register globals off.