Not connected to the database

Hello
Can someone help me?
I can’t connect to the database.
Please help fix 2 of my mistakes…

1.
Warning: mysqli_query() expects at least 2 parameters, 1 given in /storage/ssd4/662/7332662/public_html/search_exe.php on line 8

Search_exe.php :

error23

Connect.php :
<?php
$server = “localhost”;
$user = “id7332662_db_hlr”;
$pass = “■■■”;
$dbName = “id7332662_db_hlr”;
$konek=mysqli_connect($server,$user,$pass) or die (‘koneksi gagal’);
if($konek){
mysqli_select_db($konek, $dbName)or die (‘Database kosong’);
}
?>

2.
Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, null given in /storage/ssd4/662/7332662/public_html/search_exe.php on line 23

thank you-

<?php
$servername = "localhost";
$username = "username";
$password = "password";
$database = "database";

try {
    $conn = new PDO("mysql:host=$servername;dbname=$database", $username, $password);
    // set the PDO error mode to exception
    $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
    echo "Connected successfully"; 
    } catch(PDOException $e) {    
    echo "Connection failed: " . $e->getMessage();
    }
?>