diff --git a/index.php b/index.php index eaf10a3..dcb7fc5 100644 --- a/index.php +++ b/index.php @@ -4,73 +4,54 @@ - Sensor Data - -

SENSOR DATA

-connect_error) { - die("Connection failed: " . $conn->connect_error); -} - -$sql = "SELECT id, Tank1, Tank2, rainwater, Turbidity,pH_sensor, reading_time FROM sensordata ORDER BY id DESC"; /*select items to display from the sensordata table in the data base*/ - -echo ' - - - - - - - '; - -if ($result = $conn->query($sql)) { - while ($row = $result->fetch_assoc()) { - - $row_Tank1 = $row["Tank1"]; - $row_Tank2 = $row["Tank2"]; - $row_Turbidity = $row["Turbidity"]; - $row_pH_sensor = $row["pH_sensor"]; - $row_reading_time = $row["reading_time"]; - - echo ' - - - - - - - - - - '; + connect_error) { + die("Connection failed: " . $conn->connect_error); } - $result->free(); -} - -$conn->close(); -?> -
Storage TankPotashAlum Tank - - TurbiditypH_sensorData Time
' . $row_Tank1 . '' . $row_Tank2 . '' . $row_Turbidity . '' . $row_pH_sensor . '' . $row_reading_time . '
- - - - - - - - \ No newline at end of file + $sql = "SELECT id, Tank1, Tank2, rainwater, Turbidity,pH_sensor, reading_time FROM sensordata ORDER BY id DESC"; /*select items to display from the sensordata table in the data base*/ + echo ' + + + + + + '; + + if ($result = $conn->query($sql)) { + while ($row = $result->fetch_assoc()) { + + $row_s.no = $row["S.No"]; + $row_temp = $row["Temperature"]; + $row_lumi = $row["Luminosity"]; + $row_ph = $row["pH"]; + $row_reading_time = $row["Time"]; + + echo ' + + + + + + '; + } + $result->free(); + } + $conn->close(); +
S.NoTemperature + LuminositypHTime
' . $row_s.no . '' . $row_temp . '' . $row_lumi . '' . $row_ph . '' . $row_reading_time . '
+ ?> + \ No newline at end of file