Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once("connection.php");
- $sql = "SELECT * FROM upload";
- $stmt = $connect->prepare($sql);
- $stmt->execute();
- ?>
- <?php require_once("menu.html"); ?>
- <center>
- <div class="container">
- <h2>codeJs : Display Data</h2>
- <table align='center' class="table table-bordered">
- <thead>
- <tr>
- <th>Order</th>
- <th>Username</th>
- <th>Gender</th>
- <th>Country</th>
- <th>Date</th>
- </tr>
- </thead>
- <tbody>
- <?php $i = 0 ; while($res = $stmt->fetch()){ $i++; ?>
- <tr>
- <td><?php echo $i; ?></td>
- <td><?php echo $res["username"]; ?></td>
- <td><?php echo $res["gender"]; ?></td>
- <td><?php echo $res["country"]; ?></td>
- <td><?php echo $res["date"]; ?></td>
- <?php } ?>
- </tr>
- </tbody>
- </table>
- </div>
- </center>
- <style>
- thead tr:nth-child(1){ background: #4e6caf; color: white; }
- tbody tr{ background: #fff; }
- img{ width: 50px; height: 50px; }
- </style>
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
- <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement