<Fatal error: Call to a member function prepare() on a non-object in G:\\xampp\\htdocs\\live\\Billing Suryas\\model\\DBConfig.php on line 28
You write a class with these properties:
class Database
{
private $host = "localhost";
private $db_name = "new_suryas1";
private $username = "root";
private $password = "";
public $conn;
Inside a class method, variable scope is same as functions: external variables are not accessible.
To access to class properties inside a class method you have to use $this:
$this->conn = new PDO("mysql:host=" . $this->host . ";dbname=" . $this->db_name, $this->username, $this->password);
$this->conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
(...)
$stmt = $this->conn->prepare("select * from users where user_name=:uname and password=:paswrd and permission='0' and delet='0'");