[Chameleon] $_SESSION not acting like a $_SESSION

Bart Wood bartwood at gmail.com
Tue May 24 00:13:49 EDT 2005


Hi Everyone,
I've created a new widget called ZoomQuery that looks like this...

include_once(dirname(__FILE__)."/../session.inc.php");
include_once(dirname(__FILE__)."/../NavTool.php");

class ZoomQuery extends NavTool
{
  function ZoomQuery( )
  {
    if( ! isset( $_SESSION[ 'ZoomQueries' ] ) )
    {
      $this->printAlert( "Creating a BRAND NEW ZoomQuery" );
      $_SESSION[ 'ZoomQueries' ] = array( );
      // initialize the array with some stuff....
    }
    else
    {
      $this->printAlert( "Using the EXISTING ZoomQuery" );
    }
  }
}

Unfortunately I whenever I do select anything on the web page which
causes a re-post of the form I create a brand new ZoomQuery because
the object doesn't appear in the $_SESSION anymore.  The $_SESSION
acts more like a $_REQUEST object.  Does anyone have any ideas how I
can fix this problem?  Any help would be appreciated.

-Bart Wood



More information about the Chameleon mailing list