i cannot seem to create a connection to Mysql database from the following code. Can you please let me know if there is anything missing from this code. Since i have not used php code much i might have missed out something.
on submitting code im getting the following error Warning: mysql_connect() [function.mysql-connect]: Host '31.170.160.80' is not allowed to connect to this MySQL server in /home/a5847996/public_html/check_db.php on line 15
here is the code im using
<body>
<?php
$server = "-";
$database = "-";
$username = "-";
$password = "**************";
$mysqlConnection = mysql_connect($server, $username, $password);
if (!$mysqlConnection)
{
echo "Please try later.";
}
else
{
mysql_select_db($database, $mysqlConnection);
}
?>
</body>