PHP Global Variables Problem

jmg498

New Member
Messages
2
Reaction score
0
Points
0
In one of my scripts, I do the following:

Code:
session_start();
$location = $_GET['location'];    
$radar = $location;
$_SESSION['radar'] = $radar;
$location comes in from a webform. Then when I use $radar in another script that is called, it doesn't work and I get the following error:

Warning: Unknown: Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively. in Unknown on line 0

Any help would be greatly appreciated.
 

diabolo

Community Advocate
Community Support
Messages
1,682
Reaction score
32
Points
48
what PHP ver. do you have?
 

jmg498

New Member
Messages
2
Reaction score
0
Points
0
Global vars is turned off on my account so that explains the problem. I figured out a work around. Essentially, in the one script I used $location = $_GET['foo'] and in the other script I put "script.php?foo=.'$location.'";

All is working well now.

Thanks!
 
Top