Hello everybody,

problem making a connection to a class.connection.php from class.list.php to query the database

I have 3 files:
index.php: which displays the results returned from class.list.php
class.list.php: pulls in a list of names and returns the results to index.php to display in a html table.
connection.php: has the database connection information

now, it works if in include the database connection in the list.php class but I like to keep it septate so that i dont have to repeat the connection code.

any help you can provide would be greatly appreciated.

Index.php - to make it simple i shortened the code. this is just to display on the screen

HTML Code:
                $projectID = 'PROJECTK6YGTR';
		$newList = new list($projectID); 
                foreach($newList->listdisplay() as $row) 
		{  echo '<tr>';
			echo '<td>'. $row['firstname'] . '</td>';
			echo '<td>'. $row['lastname'] . '</td>';
		    echo '</tr>';

class that queries the information from the database and returns it to index.php for display
PHP Code:
class list  
{    private 
    public function 
$this ->projectId $prjID;
// end of construct
public function dbConnection()
    {    try {    
$stmt $db->query("SELECT * from tbl_user ");
$this->ListArray $stmt->fetchAll(PDO::FETCH_ASSOC);                    
PDOException $e
        {    echo 
$e->getMessage(); }            
    public function 
    {    return 
$this->ListArray;     }
// end of class 
connection.php - script i picked up on the internet

PHP Code:
class Connection
    public static 
$db false;
$database_host 'localhost';
$database_user 'testuser';
$database_pass 'testpwd';
$database_db 'testdb';

        if (
self::$db === false) {

    private function 
$dsn $this->database_type ":dbname=" $this->database_db ";host=" .
        try {
self::$db = new PDO($dsn$this->database_user$this->database_pass,  
        } catch (
PDOException $e) {
//your log handler