a stupid question about mysql database
Posted: Sat Jul 23, 2005 3:57 am
hi all,
assume my
web-site is http://www.my.com
ip address is 33.22.111.444
I created a database my_main and add an user my_user0 with password my_pswd0 to the database.
mysql_connect() function failed in php code bellow,
could u tell me why?
Thanks
php code
------------------------------------
$iphost="33.22.111.444";
$wbhost='http://www.my.com';
$dbuser='my_user0';
$psuser='my_pswd0';
//not working for both $wbhost and $iphost
$connection = mysql_connect($wbhost,$dbuser,$psuser);
if (!$connection)
{
echo(mysql_error()."\n");
die('Could not connect:');
}
else
{
echo("good!!!!!!\n");
}
assume my
web-site is http://www.my.com
ip address is 33.22.111.444
I created a database my_main and add an user my_user0 with password my_pswd0 to the database.
mysql_connect() function failed in php code bellow,
could u tell me why?
Thanks
php code
------------------------------------
$iphost="33.22.111.444";
$wbhost='http://www.my.com';
$dbuser='my_user0';
$psuser='my_pswd0';
//not working for both $wbhost and $iphost
$connection = mysql_connect($wbhost,$dbuser,$psuser);
if (!$connection)
{
echo(mysql_error()."\n");
die('Could not connect:');
}
else
{
echo("good!!!!!!\n");
}