When you make a connection to a database, you use the usual statement:
mysql_connect('localhost','USERNAME','PASSWORD');
Where localhost is the database on the same web server as the PHP script.
If you need to connect to a database that is on another server, you would replace localhost with the IP address of the server.
You can find the IP address of the database’s server by checking your eXtend Control Panel.
Article ID: 20
Created On: Mon, Mar 2, 2015 at 5:06 PM
Last Updated On: Thu, Apr 23, 2015 at 10:39 AM
Online URL: https://www.heartinternet.uk/support/article/how-do-i-use-php-to-connect-to-another-database-on-another-server.html