<?php
class Database{
  
    // specify your own database credentials
    private $host = "www.lipsonline.in:3306";
    private $db_name = "rcpindia_db2";
    private $username = "rcpindia_usr2";
    private $password = "rcp@1234";
    public $conn;
  
    // get the database connection
    public function getConnection(){
  
        $this->conn = null;
  
        try{
            $this->conn = new PDO("mysql:host=" . $this->host . ";dbname=" . $this->db_name, $this->username, $this->password);
			echo 'Connected successfully rcpindia_usr: '; 
        }catch(PDOException $exception){
            echo "Connection error: " . $exception->getMessage();
        }
  
        return $this->conn;
    }
	
	/* mysql_select_db("rcpindia_db", $link) or die ("Unable to select database"); */
	
$result = mysql_query("SELECT * FROM branch");
if(!($result)) die("Query DB did not work"); 
//fetch tha data from the database
while ($row = mysql_fetch_array($result)) {
   echo "ID:".$row{'branch'}." Name:".$row{'address'}."
   ".$row{'details'}."<br>";
}


	
	
	
	
}
?>