Begynte på tabellproduskjon
This commit is contained in:
parent
8dec0e4aa8
commit
acd4823dac
@ -22,7 +22,7 @@ function register_runner(id) {
|
|||||||
let formData = new FormData();
|
let formData = new FormData();
|
||||||
formData.append(name= 'control', value=control);
|
formData.append(name= 'control', value=control);
|
||||||
formData.append(name= 'id', value=id);
|
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);
|
formData.append('time', time);
|
||||||
fetch("upload.php", {
|
fetch("upload.php", {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
|
@ -4,5 +4,5 @@ $runner_id = $_POST['id'];
|
|||||||
$time = $_POST['time'];
|
$time = $_POST['time'];
|
||||||
$file = 'passering.csv';
|
$file = 'passering.csv';
|
||||||
$current = file_get_contents($file);
|
$current = file_get_contents($file);
|
||||||
$current .= $control . ", " . $runner_id . ", " . $time . "\n";
|
$current .= $control . "," . $runner_id . "," . $time . "\n";
|
||||||
file_put_contents($file, $current);
|
file_put_contents($file, $current);
|
Loading…
Reference in New Issue
Block a user