Denver database connection example

An example of connecting to a database in Denver. Does anyone have, dear masters?

What should I change in the code below? Or what to change in files?

session_start();
ob_start("ob_gzhandler");
//ob_implicit_flush();
ini_set('display_errors', 1);
error_reporting (E_ALL ^ E_NOTICE);
ini_set('display_errors','On');
define('CA', true);
require_once "config/db.conf.php";
require_once "config/conf.php";

Answer 1, authority 100%

Keep the conf.php file

<?
header('Content-type: text/html; charset=utf-8');
$dbhost = "localhost";
$dbname = "BDDD";
$dbuser = "root";
$dbpasswd = "";
$baza=false;
function dbConnect()
{
    global $dbhost, $dbuser, $dbpasswd, $dbname, $baza;
    if (!$baza) {
        //mysql_connect( $dbhost, $dbuser, $dbpasswd ) or die( "   " );
mysql_connect( $dbhost, $dbuser, $dbpasswd ) or die( mysql_error() );
        mysql_select_db( $dbname );
        mysql_query("SET NAMES utf8");
        $baza=true;
    }
}
dbConnect();
?>

Answer 2

The database settings are probably hidden in this config/db.conf.php file. You need to look at it and change the database access data in it.


Answer 3

It doesn’t matter if the script connects to Denver or not. MySQL database and that’s it. See the files from inside these

require_once "config/db.conf.php";
require_once "config/conf.php";