First we need to open a connection to a database by providing the FairCom Database Engine with a user name, password and the database name.
Below is the code for Initialize():
//
// Initialize()
//
// Perform the minimum requirement of logging onto the c-tree Server
//
function Initialize() {
echo "<h4>INIT</h4>\n";
// connect to server
$ses = ctsql_connect("localhost:ctreeSQL", "admin", "ADMIN");
if (!$ses)
Handle_Error("ctsql_connect()");
return ($ses);
}