I've sorted it in the config file I added: mysql_select_db($xerte_toolkits_site->database_name); below the connect DB - before that is wasn't finding any of the details from the sitedetails table. Dan