I am having trouble connecting to a MySQL database from a PHP script. The database and site are hosted with Frihost.
I have the server set to localhost
the code that I am using is:
$connection = mysql_pconnect("$dbhost","$dbusername","$dbpassword")
or die ("Couldn't connect to server!");
$db = mysql_select_db("$database_name", $connection)
or die("Couldn't select database!");
With $dbhost set to localhost
$dbusername set to the username of the database
$dbpassword as the password to the database
I am not sure if I have these set up right for this database.
Any help that anyone could provide would be greatly appreciated.
Last edited by rfwrangler on Sun Aug 06, 2006 6:49 am; edited 1 time in total
I have the server set to localhost
the code that I am using is:
$connection = mysql_pconnect("$dbhost","$dbusername","$dbpassword")
or die ("Couldn't connect to server!");
$db = mysql_select_db("$database_name", $connection)
or die("Couldn't select database!");
With $dbhost set to localhost
$dbusername set to the username of the database
$dbpassword as the password to the database
I am not sure if I have these set up right for this database.
Any help that anyone could provide would be greatly appreciated.
Last edited by rfwrangler on Sun Aug 06, 2006 6:49 am; edited 1 time in total
