<?php

function dbConnect() {
    $con = mysqli_connect("localhost", "bpluspro_bpaysocial", "N!p7MUGMLxy1r7QB", "bpluspro_bpaysocial");
    
    if (mysqli_connect_errno()) {
        echo "Failed to connect to MySQL: " . mysqli_connect_error();
        exit();
    }


    mysqli_query($con, "SET NAMES 'utf8mb4'");
    mysqli_query($con, "SET CHARACTER SET utf8mb4");
    mysqli_query($con, "SET character_set_results = 'utf8mb4', character_set_client = 'utf8mb4', character_set_connection = 'utf8mb4', character_set_database = 'utf8mb4', character_set_server = 'utf8mb4'");

    return $con;
}

?>
