Location: PHPKode > scripts > Create Your Own Directory > cms/auth/mysql.class.php
<?php

class mysqlClass
{
    var $conf;
    var $con;

    function setval($conf)
    {
        $this -> conf = $conf;
    }

    function dbConnect()
    {
        $this -> conf['db_conn'] = mysql_connect($this -> conf['db_host'], $this -> conf['db_user'], $this -> conf['db_pass']) or die(mysql_error());
        mysql_select_db($this -> conf['db_data'], $this -> conf['db_conn']) or die(mysql_error());
        $con=$this -> conf['db_conn'];
        return $con;
    }

    function dbClose()
    {
        mysql_close($this -> conf['db_conn']) or die(mysql_error());
        return true;
    }
}

?>
Return current item: Create Your Own Directory