[Phplib-users] Propagate $sess, $auth to a function
Brought to you by:
nhruby,
richardarcher
From: <ed...@gm...> - 2005-03-19 01:12:59
|
Hi, It's me again here learning phplib. Now, my problem is this way. From a normal script, I mean, from a php page accessed by a user I call a function that I developed. I need in that function access the authentication and session infromation. For example, I want in that function to know the authenticated user name to send an e-mail or something. Is any posibility to "propagate" these variables ($sess, $auth for example) ?? I tried many ways, declaring it globals and several more and never got the goal. The only way I've been able to do that is passing these data as parameter to the function. I really don't like that solution, I think there must be some, "more natural" way to do that, I think it's just to tell the function to use the "environment" or request information of the calling page but have no idea on doing that. Any ideas ?? Thanks again, and again Eduardo Alfonso |