<?php
    require_once 'data.php';
    $data_content = array();
    // Results
    $draw1 = "SELECT * FROM workingtime LIMIT 1";
    $qdraw1 = mysqli_query($data, $draw1);
    
    if(mysqli_num_rows($qdraw1) > 0) {
        $fdraw1 = mysqli_fetch_assoc($qdraw1);

            $data_content[] = array(
                'ball_1' => $fdraw1['bola_1'],
                'ball_2' => $fdraw1['bola_2'],
                'ball_3' => $fdraw1['bola_3'],
                'ball_4' => $fdraw1['bola_4'],
                'ball_5' => $fdraw1['bola_5'],
                'ball_6' => $fdraw1['bola_6'],
                'ball_7' => $fdraw1['bola_7'],
                'ball_8' => $fdraw1['bola_8'],
                'ball_9' => $fdraw1['bola_9'],
                'ball_10' => $fdraw1['bola_10'],
                'ball_11' => $fdraw1['bola_11'],
                'ball_12' => $fdraw1['bola_12'],
                'ball_13' => $fdraw1['bola_13'],
                'ball_14' => $fdraw1['bola_14'],
                'ball_15' => $fdraw1['bola_15'],
                'ball_16' => $fdraw1['bola_16'],
                'ball_17' => $fdraw1['bola_17'],
            );
            
    }


     header('Content-Type: application/json');
     header('Content-Type: application/json');
     header('Content-Type: application/json');
    header("Access-Control-Allow-Origin: *"); // Replace with your Next.js app's origin
    header("Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept");
    header("Access-Control-Allow-Methods: GET");
     echo json_encode($data_content)

?>