bool ADOdb_Session::config( string $driver, optional string $host, optional string $user, optional string $password, optional string $database, optional array $options )
The static method config defines the parameters required to establish a connection to a database to store session data. The connection established can be either:
The method should be called before the PHP command session_start. It must be defined in every procedure that accesses session variables.
The ADOdb driver to be used when establishing the connection, or optionally a DSN style configuration string with all of the necessary information required to establish a connection
The host name to use
The user name to use
The password to use
The database to connect to
An optional array of configuration parameters. A list of parameters is defined here.
include_once 'adodb/adodb.inc.php'; include_once "adodb/session/adodb-session2.php"; $driver = 'mysqli'; $host = '127.0.0.1'; $user = 'user'; $pass = 'pass'; $database = 'adodb-sess'; ADODB_Session::config($driver,$host,$user,$pass,$database); session_start(); $_SESSION['page'] = 'page1';