Begynte på tabellproduskjon

This commit is contained in:
Trygve 2024-02-16 21:26:46 +01:00
parent 8dec0e4aa8
commit acd4823dac
2 changed files with 2 additions and 2 deletions

View File

@ -22,7 +22,7 @@ function register_runner(id) {
let formData = new FormData();
formData.append(name= 'control', value=control);
formData.append(name= 'id', value=id);
time = new Date(Date.now()).toISOString()
time = new Date(Date.now()).toISOString().split('.')[0]+"Z"
formData.append('time', time);
fetch("upload.php", {
method: "POST",

View File

@ -4,5 +4,5 @@ $runner_id = $_POST['id'];
$time = $_POST['time'];
$file = 'passering.csv';
$current = file_get_contents($file);
$current .= $control . ", " . $runner_id . ", " . $time . "\n";
$current .= $control . "," . $runner_id . "," . $time . "\n";
file_put_contents($file, $current);