Date: 10/16/00
- Next message: Adam Weisbart: "RE: [phplib] Call $sess->register from a function"
- Previous message: Padraic Renaghan: "Re: [phplib] Call $sess->register from a function"
- In reply to: Adam Weisbart: "[phplib] Call $sess->register from a function"
- Next in thread: Adam Weisbart: "RE: [phplib] Call $sess->register from a function"
- Reply: Adam Weisbart: "RE: [phplib] Call $sess->register from a function"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
why don't you global the variable in the function? this should work:
page_open (...);
....
function be_usefull_please() {
global $sess, $usefullness;
...
$sess->register("usefullness");
...
}
....
----- Original Message -----
From: Adam Weisbart <adam <email protected>>
To: <phplib <email protected>>
Sent: Sunday, October 15, 2000 10:00 PM
Subject: [phplib] Call $sess->register from a function
> Greetings,
>
> I am trying to call:
>
> $sess->register("variable");
>
> ...from inside a function and it does not work. If I move the code out of
> the function and into the main body of the script, it works fine. I
realize
> this is a scope problem, but I have been unable to remedy it. Any ideas? I
> am able to register the variable in main, and then pass it by reference to
> the function, but this seems rather messy.
>
> Thank you!
>
> -Adam
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: phplib-unsubscribe <email protected>
> For additional commands, e-mail: phplib-help <email protected>
---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>
- Next message: Adam Weisbart: "RE: [phplib] Call $sess->register from a function"
- Previous message: Padraic Renaghan: "Re: [phplib] Call $sess->register from a function"
- In reply to: Adam Weisbart: "[phplib] Call $sess->register from a function"
- Next in thread: Adam Weisbart: "RE: [phplib] Call $sess->register from a function"
- Reply: Adam Weisbart: "RE: [phplib] Call $sess->register from a function"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

