[phplib] $sess->register(array) From: Marc Tardif (intmktg <email protected>)
Date: 05/01/00

I'm trying to register an array for a session, but php keeps returning an
error message that my variable isn't an array nor an object. Here's what
I've done:

1. In my auto_init file, I have:

  global $query;

  $query = array();
  $sess->register("query");

2. In one of my classes, I have these functions:

function run_first() {
  global $query;

  reset($this->column);
  while(list($key, $val) = each($this->column)) {
    if ($GLOBALS[$key]) $query[$key] = $GLOBALS[$key];
  }
}

function run_after() {
  global $query;

  while(list($key, $val) = each($query)) {
    print $val;
  }
}

When calling run_first() and then run_after(), I get the error message for
each($query) in the later function. Considering I'm calling page_open with
sessions enabled in all my php files, what can be the problem?

Thanks for the help,
Marc

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