Legal $_SESSION names

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

 



Hi gang:

While we're discussing what's legal in css, here's a couple of things I've found about sessions.

I found that starting a session with a number doesn't work.

$myvar = $_SESSION['1myvar'];

I also found that dumping a session to a variable with the same name may cause problems, such as:

$myvar = $_SESSION['myvar'];

Regardless of what anyone may say to the contrary, it doesn't work everywhere. I found that out the hard way. The fix is simply to use a different name for the variable, such as:

$my_var = $_SESSION['myvar'];

Hopes this help someone.

Cheers,

tedd
--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux