This is the error I'm getting
PHP Warning: mysqli::__construct(): (HY000/1130): Host 'ip98-436-9-183.dc.dc.cox.net' is not allowed to connect to this MySQL server in /home/ahmadarsalann/php/edit.php on line 7 Connection failed: Host 'ip72-205-1-229.dc.dc.cox.net' is not allowed to connect to this MySQL server
Down below is the code I'm using
<?php
$servername = "umw3.reclaimhosting.com";
$username = "username";
$password = "password";
// Create connection
$conn = new mysqli($servername, $username, $password);
// // Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
echo "Connected successfully";
?>
I'm using wordpress, and I'm trying to connect to the backend of the database in the code to edit data on there. The password and username isn't real for security reasons. But so far this is what I got to connect to the database using php, because that's the language it's using.
The database is in the php my admin I'm trying to access wp post. It is in php myAdmin, wp post is used by wordpress.
The picture of the info needed here :