Starbridge
01-11-2009, 09:06 PM
Hey guys, I'm trying to make a text based game, and I need some help, I tried setting up a mysql database, and tried to connect to it with this code,
<?php
$mysql_host = "edited out";
$mysql_database = "edited out";
$mysql_user = "edited out";
$mysql_password = "edited out";
$con = mysql_connect($mysql_database,$mysql_host,$mysql_u ser,$mysql_password);
mysql_select_db($mysql_database,$mysql_host);
if (!$con)
{
die(mysql_error());
} else {
if (!mysql_select_db($Mysql_database,$mysql_user,$mys ql_password))
{
echo "Worked!";
}
}
?>
and here is what I get...
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'mysql3.000webhos'@'server15.000webhost.com' (using password: YES) in /home/a4605859/public_html/cfg.php on line 9
Free Web Hosting
PHP Error Message
Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/a4605859/public_html/cfg.php on line 10
Free Web Hosting
Access denied for user 'mysql3.000webhos'@'server15.000webhost.com' (using password: YES)
Please help as soon as possible :redface: :redface: :redface:
<?php
$mysql_host = "edited out";
$mysql_database = "edited out";
$mysql_user = "edited out";
$mysql_password = "edited out";
$con = mysql_connect($mysql_database,$mysql_host,$mysql_u ser,$mysql_password);
mysql_select_db($mysql_database,$mysql_host);
if (!$con)
{
die(mysql_error());
} else {
if (!mysql_select_db($Mysql_database,$mysql_user,$mys ql_password))
{
echo "Worked!";
}
}
?>
and here is what I get...
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'mysql3.000webhos'@'server15.000webhost.com' (using password: YES) in /home/a4605859/public_html/cfg.php on line 9
Free Web Hosting
PHP Error Message
Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/a4605859/public_html/cfg.php on line 10
Free Web Hosting
Access denied for user 'mysql3.000webhos'@'server15.000webhost.com' (using password: YES)
Please help as soon as possible :redface: :redface: :redface: