I feel like you want to make a simple db connection like this maybe it can help you just copy and past and change it to your own db name
<?php
$servername = "localhost";
$username = "root";
$password = "";
$db = "bestelapp";
$conn = new mysqli($servername, $username, $password, $db);
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
?>