<html> <head> <title>POST echo</title> </head> <body>
<h1>Scanndy data:</h1>
<?php
echo "<pre>";

$ts = date("YmdHis");
$filename = "postdata/post_" . $ts . ".txt";
$file = fopen($filename, 'w');

foreach($_POST[data] as $data) {
  $record = $data['ts'] . ";" . $data['bc'] . ";" . $data['qty'];
  print("{$record}<br/>");
  fwrite($file, $record . "\n" );
}

fclose($file);

echo "</pre>";
?>
</body>
</html>


