mysqlClass.php

Codice PHP:
<?php
    
class mysqlClass {
        
// parameters to set
        
private $hostname// generally 'localhost'
        
private $username;
        private 
$password;
        private 
$databaseName;
        public 
$linkIdentifier;
        public 
$activated false// connection checker
        
        // function to set parameters
        
public function __construct() {
            
$this->hostname 'localhost';
            
$this->username 'root';
            
$this->password 'root';
            
$this->databaseName 'root';
        }
        
        
// function to connect to mysql
        
public function connect() {
            if(!
$this->activated) {
                print(
'Connected to mysql
'
);
                
$this->linkIdentifier mysql_connect($this->hostname$this->username$this->password);
                
mysql_select_db($this->databaseName$this->linkIdentifier) or die(mysql_error($this->linkIdentifier));
                return 
$this->activated true;
            } else {
                print(
'Not connected to mysql');
                return 
false;
            }
        }
        
        
// function to close mysql connection
        
public function close() {
            if(
$this->activated) {
                echo(
'Connection closed');
                
mysql_close($this->linkIdentifier) or die(mysql_error($this->linkIdentifier));
                return 
$this->activated false;
            } else {
                echo(
'Connection doesn\'t close');
                return 
false;
            }
        }
        
        
// function to execute a query
        
public function execute($sql) {
            if(
$this->activated) {
                echo(
'Query executed
'
);
                return 
mysql_query($sql$this->linkIdentifier) or die(mysql_error($this->linkIdentifier));
                return 
$this->activated false;
            } else {
                echo(
'Query doesn\'t execute');
                return 
false;
            }
        }
        
        
// function to extract a query
        
public function extract($query) {
            if(
$this->activated) {
                echo(
'Query extracted
'
);
                return 
mysql_fetch_object($query) or die(mysql_error($this->linkIdentifier));
                return 
$this->activated false;
            } else {
                echo(
'Query doesn\'t extracted');
                return 
false;
            }
        }
        
        
// function to insert records in a table
        
public function insert($t$f$v) {
            if(
$this->activated) {
                echo(
'Records inserted
'
);
                
$sql = <<<ENDSQL
                    INSERT INTO $t ($f) VALUES ($v)        
ENDSQL;
                return 
mysql_query($sql$this->linkIdentifier) or die(mysql_error($this->linkIdentifier));
                return 
$this->activated false;
            } else {
                echo(
'Records don\'t insert');
                return 
false;
            }
        }
        
        
// function to delete records from table
        
public function insert($f$t$w) {
            if(
$this->activated) {
                echo(
'Records deleted
'
);
                
$sql = <<<ENDSQL
                    DELETE $f FROM $t WHERE $w        
ENDSQL;
                return 
mysql_query($sql$this->linkIdentifier) or die(mysql_error($this->linkIdentifier));
                return 
$this->activated false;
            } else {
                echo(
'Records don\'t deleted');
                return 
false;
            }
        }
        
        
// function to update records from a table
        
public function insert($t$s$w) {
            if(
$this->activated) {
                echo(
'Records updated
'
);
                
$sql = <<<ENDSQL
                    UPDATE $t SET $s WHERE $w    
ENDSQL;
                return 
mysql_query($sql$this->linkIdentifier) or die(mysql_error($this->linkIdentifier));
                return 
$this->activated false;
            } else {
                echo(
'Records don\'t update');
                return 
false;
            }
        }
    }
?>
blogEngine.php

Codice PHP:
<?php
    
require_once('mysqlClass.php');
    class 
blogEngine extends mysqlClass {
        
// function to set parameters
        
public function __construct() {
            
parent::__construct();
        }
    }
?>
Non capisco perché non funziona, mi potete aiutare?