<?php
require_once 'config.php';
require_once 'modbus.php';
$interval = $_POST['interval']; // Get the user-defined interval from a form
// Save the data to the "data_storage" table
$stmt = $conn->prepare("INSERT INTO data_storage (register_data) VALUES (:register_data)");
$stmt->bindParam(':register_data', json_encode($registers));
$stmt->execute();
?>
Comments