Thanks Jason. I had it set up that way at first, thanks for confirming I was on the right track
The problem was Dreamweaver had set up the database connection in gateways.php as a locally referenced file.
Because gatelways.php is an include file in confirm.php and pp_confirm.php, I had to correct the database connection.
Was:
<?php require_once('../../../../Connections/BusyCMS.php'); ?>
Should have been:
<?php require_once('../Connections/BusyCMS.php'); ?>
All good now, thanks for your help