Forum Moderators: coopster
I own 2 sites on 2 different providers.
I wish a PHP script on one site access a database on the other site.
I used following instruction:
$link = mysql_connect("localhost", "mysql_user", "mysql_password")
But I do not know what to put for "localhost", and I even don't know if this could work.
Thanks for helping. Paul
$link = mysql_connect($remote_database_address, "mysql_user", "mysql_password") But you're right: this depends on whether your ISP allows access to their SQL databases from remote servers. It might be possible to do this with a secure tunnel, but again that depends on your ISP.
If all you need to do is display information from the database, you might have an easier time just including PHP pages from one site on the other.