>> Don't cram things into $_SESSION. Use this: >> >> session_register('uid'); >> global $uid; >> $uid = $uinfo[0]; > >With PHP 4.2, you don't have to use session_register. You can do it >exactly like the OP is. I do it all the time. Whether that is a >"feature" or a bug, I don't know.
It happens to work because that happens to be how Sessions are implemented this week. Programming 101: Rule #27: Relying on implementation minutia instead of documented functions is just a Bad Idea (tm). Use the functions that are documented to work. Anything else is a HACK and subject to break without notice. In PHP 4.3 or 5.0 or 7.3.1, when it *DOESN'T* work anymore and you have a zillion lines of code cramming junk into $_SESSION scattered all through your application, don't come crying to me. :-) -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php