PDA

View Full Version : Error when trying to connecto to the database : mysql99.powweb.com


jmlgonzalez
6-25-03, 07:26 PM
Hi

I uploaded today my first page and I got this error : Error when trying to connecto to the database : mysql03.powweb.com.

I am doing this to connect to the data base:


<?php
function conectarse()
{
$localhost = "mysql99.powweb.com";
$user = "userl";
$password = "password";
$db = "dbs";

if (!($link=mysql_connect("localhost",$user,$password)))
{
echo "Error when trying to connecto to the database : $localhost";
exit();
}

if (!mysql_Select_db($db,$link))
{
echo "Error opening the data base $db";
exit();
}

return $link;
}

?>

Thanks an advance

jmlgonzalez
6-25-03, 07:37 PM
I already solved it, the "localhost" variable didn't have the "$".

thanks anyway.

Atomic-Design
6-25-03, 07:43 PM
PowWeb hit's 99 mysql servers!