Current File : /home/inlingua/public_html/sensoriumpsychologists.com/backup/classes/db.class.php |
<?php
class DB {
protected $db_name = 'inlingua_sensorioum_db';
protected $db_user = 'inlingua_sensorioum_user';
protected $db_pass = '*16kgjCwq1eSbxRe';
protected $db_host = 'localhost';
protected $conn;
// Open a connect to the database.
// Make sure this is called on every page that needs to use the database.
public function connect() {
mysqli_report(MYSQLI_REPORT_STRICT);
try {
$this->conn= new mysqli($this->db_host, $this->db_user, $this->db_pass, $this->db_name);
if ($this->conn->connect_error) {
die("Connection failed: " . $this->conn->connect_error);
}
}
catch (mysqli_sql_exception $e) {
throw $e;
}
return $this->conn;
//return true;
}
}
?> </script>