22 lines
415 B
PHP
22 lines
415 B
PHP
<?php
|
|
class Database {
|
|
|
|
private $host = "localhost";
|
|
private $user = "root";
|
|
private $pass = "";
|
|
private $db = "crud_manager";
|
|
|
|
public $conn;
|
|
|
|
public function connect(){
|
|
$this->conn = new mysqli($this->host,$this->user,$this->pass,$this->db);
|
|
|
|
if($this->conn->connect_error){
|
|
die("Database Connection Failed");
|
|
}
|
|
|
|
return $this->conn;
|
|
}
|
|
}
|
|
?>
|