Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <title>Faces Project</title>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
- <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
- </head>
- <body>
- <div class="container">
- <h2>Face Detection and Data Store</h2>
- <p>These are the records that are obtained from MySQL</p>
- <table class="table table-hover">
- <thead>
- <tr>
- <th>FaceID</th>
- <th>Confidence</th>
- <th>Age</th>
- <th>Neutral</th>
- <th>Happiness</th>
- <th>Surprise</th>
- <th>Anger</th>
- <th>Sadness</th>
- <th>Positive</th>
- <th>Time</th>
- <th>Image</th>
- </tr>
- </thead>
- <tbody>
- <?php
- $servername = "localhost";
- $username = "zak";
- $password = "lol123";
- $dbname = "pi";
- // Creating Connection String
- $conn = new mysqli("localhost", "zak", "lol123", "pi");
- //Check Connection
- if($conn->connect_error) {
- die("Connection Failed: " . $conn->connect_error);
- }
- $sql = "SELECT * FROM faces ORDER BY FaceID DESC LIMIT 0, 1";
- $result = mysqli_query($conn,$sql);
- while($row = mysqli_fetch_assoc($result)){
- echo "<tr>
- <td>".$row['FaceID']."</td>
- <td>".$row['Confidence']."</td>
- <td>".$row['Age']."</td>
- <td>".$row['Neutral']."</td>
- <td>".$row['Happiness']."</td>
- <td>".$row['Surprise']."</td>
- <td>".$row['Anger']."</td>
- <td>".$row['Sadness']."</td>
- <td>".$row['Positive']."</td>
- <td>".$row['Time']."</td>
- <td><img src="/imgs/" /></td></tr>";
- }
- ?>
- </tbody>
- </table>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement