000webhost でレトロ Habbo の Web サイトを作成していて、このエラーを見つけました
警告: mysql_query() [function.mysql-query]: 25 行目の /home/a8004576/public_html/global.php で、ユーザー 'a8004576'@'localhost' (パスワードを使用: NO) のアクセスが拒否されました
25 行目のスクリプト:
$server_statut_sql = mysql_query("SELECT users_online,rooms_loaded FROM server_status LIMIT 1") or die(mysql_error());
$server = mysql_fetch_assoc($server_statut_sql);
if ($page_ban != 1)
{
$verif_banip = mysql_query('SELECT value FROM bans WHERE value = "'.$_SERVER['REMOTE_ADDR'].'"');
if(mysql_num_rows($verif_banip) == 1){
Redi('banned');
}
}
if ($page_maintenance != 1) {
if ($maintenance == 1) {
Redi('maintenance');
}
これは私のmysqlファイルです
<?php
$username = "a800xxxxxx";
$password = "xxxxxxxxxxxxx";
$hostname = "mysql1.000webhost.com";
//connection to the database
$dbhandle = mysql_connect($hostname, $username, $password)
or die("Unable to connect to MySQL");
echo "Connected to MySQL<br>";
//select a database to work with
$selected = mysql_select_db("a800xxxxxx",$dbhandle)
or die("PK TU FAIT CHIER SALE FDP");
//execute the SQL query and return records
$result = mysql_query("SELECT id, model,year FROM cars");
//fetch tha data from the database
while ($row = mysql_fetch_array($result)) {
echo "ID:".$row{'id'}." Name:".$row{'model'}."Year: ". //display the results
$row{'year'}."<br>";
}
//close the connection
mysql_close($dbhandle);
?>