<?php
include("DbParam.class.php");
include("Conn.class.php");
$param = new DbParam;
// get user name from the terminal or from file and store in session variable
if ($_REQUEST['server'])
$_SESSION['server'] = $_REQUEST['server'];
if ($_SESSION['server']) {
$_server = $_SESSION['server'];
} else
$_server = $param->_server;
if ($_REQUEST['user'])
$_SESSION['user'] = $_REQUEST['user'];
if ($_SESSION['user']) {
$_user = $_SESSION['user'];
} else
$_user = $param->_user;
if ($_REQUEST['pwd'])
$_SESSION['pwd'] = $_REQUEST['pwd'];
if ($_SESSION['pwd']) {
$_pwd = $_SESSION['pwd'];
} else
$_pwd = $param->_pwd;
if ($_REQUEST['db'])
$_SESSION['db'] = $_REQUEST['db'];
if ($_SESSION['db']) {
$_db = $_SESSION['db'];
} else
$_db = $param->_db;
// echo "host: " . $_SESSION['host'];
$conn = new Conn;
$conn->_server = $_server;
$conn->_user = $_user;
$conn->_pwd = $_pwd;
$conn->_db = $_db;
?>
|