Starbridge
2009-01-11 16:06:22
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]<?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_user,$mysql_password);
mysql_select_db($mysql_database,$mysql_host);
if (!$con)
{
die(mysql_error());
} else {
if (!mysql_select_db($Mysql_database,$mysql_user,$mysql_password))
{
echo "Worked!";
}
}
?>
[/PHP] and here is what I get…[PHP]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)[/PHP]
Please help as soon as possible :redface: :redface: :redface:
$mysql_host = "edited out";
$mysql_database = "edited out";
$mysql_user = "edited out";
$mysql_password = "edited out";
$con = mysql_connect($mysql_database,$mysql_host,$mysql_user,$mysql_password);
mysql_select_db($mysql_database,$mysql_host);
if (!$con)
{
die(mysql_error());
} else {
if (!mysql_select_db($Mysql_database,$mysql_user,$mysql_password))
{
echo "Worked!";
}
}
?>
[/PHP] and here is what I get…[PHP]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)[/PHP]
Please help as soon as possible :redface: :redface: :redface: