Hey guys I have problem with connecting my .php file to database, I've tried different ways but still the same response. Here is my code (updated):
<?php
$server_name = "localhost";
$mysql_username = "*****";
$mysql_password = "*****";
$db_name = "*****";
$conn = mysqli_connect ($server_name, $mysql_username, $mysql_password, $db_name);
if($conn) {
echo "Success";
}
else {
echo "Failed";
}
?>
UPDATE Guys, when I connect to localhost everything works fine but I would like to connect to a server and be able to upload data from different android devices. Currently I use 000webhost.com free service, so might it be the key point and problem that I didn't upgrade that to PRO?