Files
ritzenbergen-backend/bulitipp/paarungen.php
2025-06-16 21:42:22 +02:00

17 lines
514 B
PHP
Executable File

<?php
include("./check.php");
header("Access-Control-Allow-Origin: *");
header("Content-Type: application/json");
if(!isset($_GET["spieltag"])) die("GET spieltag fehlt");
$spieltag=$_GET["spieltag"];
$data=[];
foreach (srowforeach("SELECT `heim`,`gast`, `id` from `buli-paarungen` where `spieltag`=?;",[$spieltag]) as $key => $value) {
array_push($data,[$value[0],$value[1],$value[2]]);
}
$result=["reload"=>$reload,"data"=>$data];
echo json_encode($result, JSON_UNESCAPED_SLASHES|JSON_UNESCAPED_UNICODE);