quick DB connect question

C++, C#, Java, PHP, ect...
Post Reply
User avatar
Torniquet
Posts: 869
Joined: Sun Aug 02, 2009 6:18 am

quick DB connect question

Post by Torniquet »

If i want to connect to a database on site A. and use / display info on site B

what needs to be done?

just change $hostname from localhost to the websites IP / db addy?

ta xxx
New Site Coming Soon! Stay tuned :D
User avatar
hallsofvallhalla
Site Admin
Posts: 12026
Joined: Wed Apr 22, 2009 11:29 pm

Re: quick DB connect question

Post by hallsofvallhalla »

i am a little confused on the question, but the site has nothing to do with the database. As long as you know the address and the user and pass you can connect to any database.
User avatar
Chris
Posts: 1581
Joined: Wed Sep 30, 2009 7:22 pm

Re: quick DB connect question

Post by Chris »

Well if the database is hosted on server A, and you want to connect to it from server B. Then you would need to connect to the ip of server A.
Fighting for peace is declaring war on war. If you want peace be peaceful.
User avatar
hallsofvallhalla
Site Admin
Posts: 12026
Joined: Wed Apr 22, 2009 11:29 pm

Re: quick DB connect question

Post by hallsofvallhalla »

well basically alter your connect.php to match server b
Post Reply

Return to “Coding”