Login   Register  
PHP Classes
elePHPant
Icontem

File: DbData.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Umesh Rai  >  MySQL Paginator  >  DbData.php  >  Download  
File: DbData.php
Role: Auxiliary script
Content type: text/plain
Description: Setup connection class variable
Class: MySQL Paginator
Display MySQL query results split in pages
Author: By
Last change:
Date: 9 years ago
Size: 978 bytes
 

Contents

Class file image Download
<?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;

?>