Hi, I'd been making a web on localhost and when I tried to move it on host it shows me lots of errors. Seems like it can't connect to my local database. Here's the code:
$host = "myip";
$user = "root";
$pass = "";
$db = "mydatabase";
mysql_connect($host, $user, $pass);
mysql_select_db($db);
$on = mysql_fetch_row(mysql_query("SELECT COUNT(online) FROM characters WHERE online=1"));
echo "<br>Online: $on[0]<br><br>";
And here's the output:
Warning: mysql_connect() [function.mysql-connect]: Host 'myip' is not allowed to connect to this MySQL server in * on line 46
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in * on line 48
Online:
Thanks for help