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_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.No Temperature Luminosity pH Time
' . $row_s.no . ' ' . $row_temp . ' ' . $row_lumi . ' ' . $row_ph . ' ' . $row_reading_time . '
?>