<?php
$maxConnections = 1; // Set the maximum allowed connections
$currentConnections = 0;
if ($currentConnections < $maxConnections) {
    $currentConnections++;
    $headers = getallheaders();
    $token = $headers['Authorization'];

    $query = mysqli_query($business_conn, "SELECT * FROM attendance_device_list WHERE token = '$token'");
    while ($row = mysqli_fetch_assoc($query)) {
        $businessid = $row["businessid"];
        $macId = $row["macId"];
        $updatedOn = $row["updated_on"] . ".0";
    }
    $servername = "localhost";
    $username = "erp";
    $password = "JesusChristisLord";
    $dbname = "aurarich_attendance-business1";
    $conn = mysqli_connect($servername, $username, $password, $dbname);
} else {
    // echo "Max connections reached. Please try again later.";
}




