SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict Feudalism's Avatar
    Join Date
    Jun 2002
    Location
    Buenos Aires, Argentina
    Posts
    361
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question mysql_connect TO datasource in other web site

    Is there a way to do that ? I owe two different sites in two different host / servers. I need some php routine to connect into the datasource of the another host.

  2. #2
    SitePoint Evangelist
    Join Date
    Jun 2003
    Location
    Melbourne, Australia
    Posts
    440
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The answer is on the manual page for mysql_connect(). Something like
    PHP Code:
    $link mysql_connect('example.com''mysql_user''mysql_password'); 
    This works well: my hosting provider has a separate database server. My sites are on a different machine, so I have to put the domain name of the DB server in.
    Zealotry is contingent upon 100 posts and addiction 200?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •