This is the connection.php file being used to connect to a phpMyAdmin database
<?php
require_once 'config.php';
class DB_Connection {
private $connect;
function __construct() {
$this->connect = mysqli_connect(hostname, user, password, db_name)
or die("Could not connect to db");
}
public function getConnection()
{
return $this->connect;
}
}
?>
But i seem to get this error when i try to post with Postman
<br />
<b>Warning</b>: mysqli_connect(): (HY000/1130): Host '192.168.98.178' is not allowed to connect to this MariaDB server in
<b>/Applications/XAMPP/xamppfiles/htdocs/connection.php</b> on line
<b>8</b>
<br />
Could not connect to db