[phplib] function works only the first time From: Stefan Jösch (sj <email protected>)
Date: 04/18/01

Hi,

I have included the shopping cart functionality to my application, so I added

global $cart;
if (!isset($cart)) {
        $cart = new My_Cart;
        $sess->register("cart");
}

to setup.inc and extended Cart by My_Cart in local.inc. There I added a
self written function like

class My_Cart extends Cart {
  function show_articles() {
    print "foo"
  }
}

On the output page is the following line:

<?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.

Thanks,
    Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>