How do you connect to more than 1 mysql database in PHP?

J0nny3

New member
is there a way to change it so it can connect to 2 databases...

<?php
$con = mysql_connect("localhost","username","password");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}

mysql_select_db("databasename", $con);

?>
 
Back
Top