diff --git a/scripts/viewdb.php b/scripts/viewdb.php
index 32180b2..be7cb55 100644
--- a/scripts/viewdb.php
+++ b/scripts/viewdb.php
@@ -1,45 +1,115 @@
-
-
- 'birds' database 'detections' table
-
-
- connect_errno ) {
- printf("Connect failed: %s
", $mysqli->connect_error);
- exit();
- }
- printf('Connected successfully.
');
-
- $sql = 'SELECT * FROM detections';
-
- $result = $mysqli->query($sql);
-
- if ($result->num_rows > 0) {
- while($row = $result->fetch_assoc()) {
- printf("Date: %s || Time: %s || Sci_Name: %s || Com_Name: %s || Confidence: %s || Lat: %s || Lon: %s || Cutoff: %s || Week: %s || Sens: %s || Overlap: %s
",
- $row["Date"],
- $row["Time"],
- $row["Sci_Name"],
- $row["Com_Name"],
- $row["Confidence"],
- $row["Lat"],
- $row["Lon"],
- $row["Cutoff"],
- $row["Week"],
- $row["Sens"],
- $row["Overlap"]);
- }
- } else {
- printf('No record found.
');
- }
- mysqli_free_result($result);
- $mysqli->close();
- ?>
-
+connect_error) {
+ die('Connect Error (' .
+ $mysqli->connect_errno . ') '.
+ $mysqli->connect_error);
+}
+
+// SQL query to select data from database
+$sql = "SELECT * FROM detections";
+$result = $mysqli->query($sql);
+$mysqli->close();
+?>
+
+
+
+
+
+
+ Birds Database, Detections Table
+
+
+
+
+
+
+ BirdsDB Detections Table
+
+
+
+ | Date |
+ Time |
+ Sci_Name |
+ Com_Name |
+ Confidence |
+ Lat |
+ Lon |
+ Cutoff |
+ Week |
+ Sens |
+ Overlap |
+
+
+fetch_assoc())
+{
+?>
+
+
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+
+
+
+
+