diff --git a/registrering.php b/registrering.php index d4419b8..0a03264 100644 --- a/registrering.php +++ b/registrering.php @@ -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", diff --git a/upload.php b/upload.php index 6598f1b..db2df82 100644 --- a/upload.php +++ b/upload.php @@ -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); \ No newline at end of file