Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <link rel="stylesheet" type="text/css" href="/css/table.css">
- <script src='/scripts/table.js' type='text/javascript'></script>
- </head>
- <body>
- <div class="table--class" style="width:50%;">
- <table>
- <thead>
- <tr>
- <th>Priority</th>
- <th>Event</th>
- <th>Source</th>
- <th>Date</th>
- <th>Time</th>
- </tr>
- </thead>
- <tbody>
- <?php
- $connection = mysql_connect('localhost', 'root', 'mypass');
- mysql_select_db('log');
- $query = "SELECT * FROM `Logs`";
- $result = mysql_query($query);
- while($row = mysql_fetch_array($result)){
- echo "<tr>";
- echo "<td>".$row['severity']."</td>";
- echo "<td>".$row['event']."</td>";
- echo "<td>".$row['source']."</td>";
- echo "<td>".$row['time']."</td>";
- echo "<td>".$row['date']."</td>";
- echo "</tr>";
- }
- mysql_close();
- ?>
- </tbody>
- </table>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement