Thanks for your help, eoghain.
That worked. It did bring up some more questions though. I am passing in the database authentication via arguments so I actually had to write a constructor in the sub-class like this and I renamed the other method:
function testextend ($dbserver,$dbdatabase,$dbusername,$dbpassword){
parent::mysql_database($dbserver,$dbdatabase,$dbusername,$dbpassword);
}
I also have other sub-classes with the same constructor. So when I call it from the webpage, will I have to call it like this:
$mydb = new mysql_database($dbserver,$dbdatabase,$dbusername,$dbpassword);
$html = new testextend ($dbserver,$dbdatabase,$dbusername,$dbpassword);
$tableinfo = new testextend2 ($dbserver,$dbdatabase,$dbusername,$dbpassword);
There must be a better way of doing this?