<?php

$data='./data/logs.dat';

function loadLogs($file) {
  $string = file_get_contents($file);
  return json_decode($string, true);
}

$logs=Array();

if(file_exists($data)) 
  $logs=loadLogs($data);

$uuid=uniqid('log',true);

echo "UUID = $uuid<br>";
echo '
<form method=post>


Filament <input type=input name=filament><br>
Vitesse <input type=input name=v0><br>
T° Extrudeur <input type=input name=te><br>
T° Bed <input type=input name=tb><br>
Fan <input type=input name=fan><br>
ID <input type=input name=id><br>
</form>
';

echo "<pre>";
print_r($logs);
echo "</pre>";
  



?>
