title: How do you connect to multiple MySQL databases on a single webpage?
body: <p>I have information spread out across a few databases and want to put all the information onto one webpage using PHP.  I was wondering how I can connect to multiple databases on a single PHP webpage.</p>
  
  <p>I know how to connect to a single database using:</p>
  
  <pre><code>$dbh = mysql_connect($hostname, $username, $password) 
          or die("Unable to connect to MySQL");
  </code></pre>
  
  <p>However, can I just use multiple "mysql_connect" commands to open the other databases, and how would PHP know what database I want the information pulled from if I do have multiple databases connected.</p>