grin Hi Rincewind,
Many thanks for the help - unfortunately no joy - I get everybody's favourite error message:
Warning: main(MDB2.php) [function.main]: failed to open stream: No such file or directory in /home/tempscou/public_html/testdbconnection8.php on line 7
Fatal error: main() [function.require]: Failed opening required 'MDB2.php' (include_path='.:/usr/local/bin/pear') in /home/tempscou/public_html/testdbconnection8.php on line 7
It seems like PEAR/MDB2 isn't installed (i also tried db.php - same problem). My host assures me the path to the pear directory is correct.
Is there any PHP procedure to test for a pear installation, and/or an mdb installation? Unfortunately I don't have shell access on the remote server. :-(
Finally, here's the code I used to to access mdb2.php. Many thanks for the help - if you have any other suggestions, I'd love to hear them - I really am quite stumped.
$path = "/usr/local/bin/pear/";
require_once($path.'mdb2.php');
$connection = MDB2::connect("mysql://$db_username:$db_password@$db_host/$db_database");
if (MDB2::isError($connection)) {
die ("Could not connect to the database: <br />".MDB2::errorMessage($connection));
}