* Thus wrote Charles Collins ([EMAIL PROTECTED]): > I have two test files running on a server, which is giving me a headache, > due to the fact the session variables are not been maintained across the two > pages. > > The server is running ... > > PHP Version = 4.0.5 > register_globals = ON > Session Support = Enabled
This looks like output from 'php -i'. The php module *can* have a different config, check these values from phpinfo() in a webpage in the same directory as your scripts with > ... > > <? > session_start(); > session_register("test"); > $test = "Hullo World"; > print $test; // prints "test" > ?> > > Page # 2 > > <? > session_start(); > print $test; // prints nothing, zip! > ?> I would strongly suggest using the $_SESSION variable, even if register_globals is on, that way sessions work regardless of its setting. page 1: session_start(); $test = $_SESSION['test'] = 'Hullo World'; echo $test; page 2: session_start(); $test = $_SESSION['test']; echo $test; Curt -- "I used to think I was indecisive, but now I'm not so sure." -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php