realjumper Posted September 6, 2006 Share Posted September 6, 2006 Hi,Apologies if this isn't the right forum, but I hope someone could help me with this issue. We have 2 serrvers here.....one is the web server and the other is the Intranet server. The staff database is kept on the Intranet server and the web stuff is kept on the web server. The Intranet is only avaliable on campus.Now I have a need to develop.....(actually I already did the developing).....an application that queries both databases.....which are on different servers. The application is hosted on the webserver, with a connection to applicaton database as per the norm like this is fine:[code]<?php// Make a MySQL Connectionmysql_connect("localhost", "username", "password") or die(mysql_error());mysql_select_db("file_admin") or die(mysql_error());?>[/code]But I also need to query the Intanet server. I can't seem to connect to the Intranet server. I have tried using the ip like this, which I thought would work....but apparently not[code]<?php// Make a MySQL Connectionmysql_connect("202.11.23.10", "username", "password") or die(mysql_error());mysql_select_db("staff_db") or die(mysql_error());?>[/code]Is it not possible to connect via ip? Quote Link to comment Share on other sites More sharing options...
AdRock Posted September 6, 2006 Share Posted September 6, 2006 don't know if this would helphttp://uk2.php.net/function.mysql-connect Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.