0byt3m1n1
Path:
C:
/
wamp64
/
www
/
WaterCat
/
[
Home
]
File: list.php
<?php $servername = "localhost"; $username = "root"; $password = ""; $dbname = "watercat"; $conn = mysqli_connect($servername, $username, $password, $dbname); $query = "SELECT info.info_id, info.id, info.pH, info.Alkalinity, info.Hardness, info.Chloride, info.TDS, info.Iron, info.Ammonia, info.Nitrate, info.Phosphate, info.Residual_Chloride, info.WaterLevel, info.Remarks, details.Details_id, details.Name, details.Name_User, details.Location, details.Observations, details.Image FROM info JOIN details ON info.id = details.Id GROUP BY info.info_id"; $result = mysqli_query($conn, $query); ?> <!doctype html> <html lang="en"> <head> <link rel="stylesheet" href="assets/css/bootstrap.min.css"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.9.1/font/bootstrap-icons.css"> <link rel="stylesheet" type="text/css" href="styles.css"> <link rel="stylesheet" type="text/css" href="nav.css"> <style> table, th, td { border: 1px solid black; } </style> </head> <body class="bg-white" background="assets/images/slider/s1.jpg" alt=""> <div class="topnav"> <a class="active" href="indexnew.php">Home</a> <a href="#news">News</a> <a href="contact.php">Contact</a> <a href="about.html">About</a> </div> <table cellspacing="5px" cellpadding="5%" align="center"> <tr> <th>ID</th> <th>NAME</th> <th>NAME OF USER</th> <th>LOCATION</th> <th>OBSERVATIONS</th> <th>SITE VIEW</th> <th>pH</th> <th>ALKALINITY</th> <th>HARDNESS</th> <th>CHLORIDE</th> <th>TDS</th> <th>IRON</th> <th>AMMONIA</th> <th>NITRATE</th> <th>PHOSPHATE</th> <th>RESIDUAL CHLORIDE</th> <th>WATER LEVEL</th> <th>REMARKS</th> <th>ACTION</th> </tr> <?php while ($rows = mysqli_fetch_assoc($result)) { ?> <tr> <td><?php echo $rows['id']; ?></td> <td><?php echo $rows['Name']; ?></td> <td><?php echo $rows['Name_User']; ?></td> <td><?php echo $rows['Location']; ?></td> <td><?php echo $rows['Observations']; ?></td> <td><img width='100px' height='100px' src='images/<?php echo $rows['Image']; ?>' alt='<?php echo $rows['Image']; ?>'></td> <td><?php echo $rows['pH']; ?></td> <td><?php echo $rows['Alkalinity']; ?></td> <td><?php echo $rows['Hardness']; ?></td> <td><?php echo $rows['Chloride']; ?></td> <td><?php echo $rows['TDS']; ?></td> <td><?php echo $rows['Iron']; ?></td> <td><?php echo $rows['Ammonia']; ?></td> <td><?php echo $rows['Nitrate']; ?></td> <td><?php echo $rows['Phosphate']; ?></td> <td><?php echo $rows['Residual_Chloride']; ?></td> <td><?php echo $rows['WaterLevel']; ?></td> <td><?php echo $rows['Remarks']; ?></td> <td> <form method="post" action="del.php"> <input type="hidden" name="infoid" value="<?php echo $rows['info_id']; ?>"> <input type="hidden" name="detailsid" value="<?php echo $rows['Details_id']; ?>"> <input type="submit" name="delete" value="Delete"> </form> </td> </tr> <?php } ?> </table> <button class="btn fw-bolder px-4 py-2 btn-warning"><a href="queries.php">View All Queries</a></button> </body> </html>