<?php
function connectDb($user, $pass, $host, $db)
{ 
    // This function connects to a MySQL server using MySQLi
    $sock = mysqli_connect($host, $user, $pass, $db);

    // Check connection
    if (!$sock) {
        die("Connection failed: " . mysqli_connect_error());
    }

    return $sock; 
} 

function callconnect() 
{
    // Key in your Database user ID, password, Server Host Name, and Database name here
    $socket = connectDb('dvsvigov_vacc', 'DVSvacdos123', 'localhost', 'dvsvigov_vacdos');
    
    // Optionally return the connection for further use
    return $socket;
}

// Call the connection function
$connection = callconnect();
?>
