Reading from HTML and saving to Mysql



I work on a project where I send variables to a website via LabView.
Variables (double/ numbers) are displayed on the HTML table as in the picture below.
I want to achieve that I save this same table to mysql.


Do you have any idea or some example of how to do it? how much is this something achievable at all? in Mysql knowledge for now I can only make a userlogin form and i expect that this is in that rank or at least not much harder.

I’m grateful for any help because I’ve been around this problem for a few days now because the knowledge from php is probably level higher then mine.


Storing data in SQL is always the same - create table… insert into… etc. So what code have you now?


this is my table inside html (novavarijabla_x1 to novavarijabla_x9 are simulated numbers and table is same as picture in first post up there):

0 @@novavarijabla
0 @@novavarijabla2
0 @@novavarijabla3
0 @@novavarijabla4
0 @@novavarijabla5
0 @@novavarijabla6
0 @@novavarijabla7
0 @@novavarijabla8
0 @@novavarijabla9

I have been using a lot of examples from google and trying everything but no luck. this php is something close to this what i really want.
FILE 1 NAME: index.php


$servername = “localhost”;
$username = “root”;
$password = “”;
$dbname = “variables”;

// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);

$sql = “INSERT INTO variables (var_x, var_y, var_z, var_xa, var_ya, var_za, var_xb, var_yb, var_zb)
VALUES (‘1.1’, ‘2.1’, ‘3.1’, ‘4.1’, ‘5.1’, ‘6.1’, ‘7.1’, ‘8.1’, ‘9.1’ )”;

if ($conn->query($sql) === TRUE) {
echo “New record created successfully”;
} else {
echo "Error: " . $sql . “
” . $conn->error;


now i have to change this numbers…1.1, 2.1…etc with incoming variable numbers