<?php
try {
    include 'credentials.php';
 //   include '../credentials.php';
} catch (Exception $exc) {
    
}

Class dbObj{
 /* Database connection start */
 //var $servername = "127.0.0.1";
    var $conn;
 function getConnstring() {
     
 $con = mysqli_connect(HOST, USERNAME, PASSWORD, DBNAME) or die("Connection failed: " . mysqli_connect_error());
 
 /* check connection */
 if (mysqli_connect_errno()) {
 printf("Connect failed: %s\n", mysqli_connect_error());
 exit();
 } else {
 $this->conn = $con;
 }
 return $this->conn;
 }
}
 
?>
