Date: 04/18/01
- Next message: Chris Johnson: "RE: [phplib] Re: The future of PHPlib"
- Previous message: Stefan Jösch: "[phplib] function works only the first time"
- In reply to: Stefan Jösch: "[phplib] function works only the first time"
- Next in thread: Stefan Jösch: "Re: [phplib] function works only the first time"
- Reply: Stefan Jösch: "Re: [phplib] function works only the first time"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 18 Apr 2001, at 15:42, Stefan Jösch wrote:
> <?php $cart->show_articles(); ?>
>
> This works on session initialisation time, i.e. the time when the session id
> is set, and only if the function is on the start page. After reloading the
> function prints nothing.
>
Because the object can't be extracted back from the session.
Remember that for storing an object in a session slot you have to
declare the "special" property $classname. So if you need to save
a My_Cart object in a session its definition should be:
class My_Cart extends Cart {
var $classname = "My_Cart";
function show_articles() {
print "foo"
}
}
This way it should work as expected... I hope!
bye!
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
Fabrizio Ermini Alternate E-mail:
C.so Umberto, 7 faermini <email protected>
loc. Meleto Valdarno Mail on GSM: (keep it short!)
52020 Cavriglia (AR) faermini <email protected>
---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>
- Next message: Chris Johnson: "RE: [phplib] Re: The future of PHPlib"
- Previous message: Stefan Jösch: "[phplib] function works only the first time"
- In reply to: Stefan Jösch: "[phplib] function works only the first time"
- Next in thread: Stefan Jösch: "Re: [phplib] function works only the first time"
- Reply: Stefan Jösch: "Re: [phplib] function works only the first time"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

