I want to connect to a server hosted online.
My code connects to local host but when i change the values to the hosted server it gives me an error
Warning: mysqli_connect(): (HY000/2002): No connection could be made because the target machine actively refused it.
<?php
$servername = "zamokuhleWeb.co.za";
$username = "*****";
$password = "****";
// Create connection
$conn = mysqli_connect($servername, $username, $password);
// Check connection
if (!$conn) {
die("Connection failed: " . mysqli_connect_error());
}
echo "Connected successfully";
?>
I want to the access the database and get certain information from it