hey everybody, I'm a bit of a newbie to MySQL and PHP, but I've hit a bit of a problem.
I've downloaded a Webcounter PHP script tat uses MySQL to store Data, and the way its supposed to configure itself and add its tables into MySQL is by enterring in the folder name, Username, Password, and Host of MySQL in a file called "variables.php", and then to run "createtable.php", which uses the variables to log into mySQL and create the tables.
Now, When I do this, I get these message in my browser window:
Warning: mysql_connect(): Access denied for user: 'fibbi@127.0.0.1' (Using password: YES) in F:\program files\Apache Group\Apache2\htdocs\counter\createtable.php on line 9
Warning: mysql_db_query(): supplied argument is not a valid MySQL-Link resource in F:\program files\Apache Group\Apache2\htdocs\counter\createtable.php on line 13
Error creating table!!!
Warning: mysql_close(): supplied argument is not a valid MySQL-Link resource in F:\program files\Apache Group\Apache2\htdocs\counter\createtable.php on line 23
However, If I set my password in PHP.ini as blank and do the same for the variables, it magically works! So does anyone know what the problem is?
By the way, here is the code from createtable.php:
<?php
//GG NETWORKS SIMPLE HIT COUNTER 1.0
require("variables.php");
$Tablename = "gg_hits";
$Link = mysql_connect($Host, $DBUser, $DBPass);
$Query = "CREATE table $Tablename (id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, hit TEXT, hitnumber TEXT)";
if(mysql_db_query($DBName, $Query, $Link)){
print("MySQL table created successfully!!!");
}else{
print("Error creating table!!!");
}
mysql_close($Link);
?>
thanks!