define("dbHost","localhost");
define("dbUsername","user72751_sovaov");
define("dbPassword","******");
define("dbName","user72751_sovaov");
class DB{
private $dbHost = 'localhost';
private $dbUsername = "user72751_sovaov";
private $dbPassword = "****";
private $dbName = "user72751_sovaov";
public function __construct()
{
if(!$this->db){
// Connect to the database
$conn = new mysqli($this->dbHost, $this->dbName, $this->dbPassword, $this->dbName);
if($conn->connect_error){
die("Failed to connect with MySQL: " . $conn->connect_error);
}else{
$this->db = $conn;
}
}
}
class DBmysql {
public static function LocalHost()
{
return 'localhost';
}
public static function BDUsername()
{
return 'user72751_sovaov';
}
public static function passwd()
{
return '*****';
}
}
include_once 'Второй_файл.php';
class DB{
function Local()
{
$dbHost = DBmysql::LocalHost();
$dbUsername = DBmysqlB::BDUsername();
$dbPassword = DBmysql::passwd();
}
#private $dbHost = 'localhost';
# private $dbUsername = "user72751_sovaov";
#private $dbPassword = "****";
private $dbName = "user72751_sovaov";
public function __construct()
{
if(!$this->db){
// Connect to the database
$conn = new mysqli($this->dbHost, $this->dbUsername, $this->dbPassword, $this->dbName);
if($conn->connect_error){
die("Failed to connect with MySQL: " . $conn->connect_error);
}else{
$this->db = $conn;
}
}
}
define("dbHost","localhost");
define("dbUsername","user72751_sovaov");
define("dbPassword","passwd");
define("dbName","user72751_sovaov");
include_once 'Первый_файл_с_перемнными.php';
class DB{
private $dbHost ='Localhost';
private $dbUsername = "user72751_sovaov";
private $dbPassword = "passwd";
private $dbName = "user72751_sovaov";
public function __construct()
{
if(!$this->db){
// Connect to the database
$conn = new mysqli($this->dbHost, $this->dbUsername, $this->dbPassword, $this->dbName);
if($conn->connect_error){
die("Failed to connect with MySQL: " . $conn->connect_error);
}else{
$this->db = $conn;
}
}
}
define("dbHost","localhost");
define("dbUsername","user72751_sovaov");
define("dbPassword","passwd");
define("dbName","user72751_sovaov");
include_once 'Первый_файл_с_перемнными.php';
class DB{
private $dbHost ='Localhost';
private $dbUsername = "user72751_sovaov";
private $dbPassword = "passwd";
private $dbName = "user72751_sovaov";
public function __construct()
{
if(!$this->db){
// Connect to the database
$conn = new mysqli($this->dbHost, $this->dbUsername, $this->dbPassword, $this->dbName);
if($conn->connect_error){
die("Failed to connect with MySQL: " . $conn->connect_error);
}else{
$this->db = $conn;
}
}
}