I've created a database on az.pl I wanted to use old code which works perfectly on other website. I get this error message:
Could not connect to mysql
Here's my code:
$dbh = mysqli_connect("localhost","user","password", "db") or die ("could not connect to mysql");
I've also tried:
$c = mysql_connect("localhost", "user", "password");
mysql_select_db("db");
$result = mysql_query("SELECT 'Hello, dear MySQL user!' AS _message FROM DUAL");
$row = mysql_fetch_assoc($result);
echo htmlentities($row['_message']);
Both with the same result, the error message.
I've searched the web but I haven't found exact problem.