Re: PHP 4.0.6 Sessions Not Working...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Peter Beckman wrote:

Here's my test script:

    <?php
    session_start();
    echo session_id();

session_register('user');


    echo ":".isset($HTTP_SESSION_VARS['user']);
    print_r($HTTP_SESSION_VARS);
    echo "<hr/>Now: ".$HTTP_SESSION_VARS['user'];
    if (empty($HTTP_SESSION_VARS['user'])) {
            $HTTP_SESSION_VARS['user'] = "beckman";
    } else {
            $HTTP_SESSION_VARS['user'] = "";
    }
    echo "<hr/>After: ".$HTTP_SESSION_VARS['user'];

If sessions worked correctly, the "user" session variable would bounce back
and forth between the "Now:" and "After:" statements.

-- ---John Holmes...

Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals – www.phparch.com

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux