Sebastian Bergmann wrote:
>   As I initially stated, I'm trying this with PHP 4.0.8-dev.

  The following script works with both register_globals enabled and
  disabled and PHP 4.0.8. Can't test it right now with pre-4.0.7, but it
  should work, too.

    <?php
    session_register('session');
    
    if (ini_get('register_globals')) {
      $session = &$GLOBALS['session'];
    } else {
      if (function_exists('import_request_variables')) {
        $session = &$_SESSION['session'];
      } else {
        $session = &$HTTP_SESSION_VARS['session'];
      }
    }
    
    echo $session++;
    ?>

  Now, is this the simplest solution possible, to use session variables
  while not depending on the setting of register_globals?

  Thanks,
Sebastian

-- 
  Sebastian Bergmann
  http://sebastian-bergmann.de/                 http://phpOpenTracker.de/

  Did I help you? Consider a gift: http://wishlist.sebastian-bergmann.de/

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to