Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!doctype html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <title>Infraction Test</title>
- </head>
- <body>
- <?php
- $username = "Utilisals";
- $password = "██████████████";
- $host = "localhost";
- $connector = mysql_connect($host,$username,$password)
- or die("Unable to connect");
- echo "Connections are made successfully::";
- $selected = mysql_select_db("test_db", $connector)
- or die("Unable to connect");
- //execute the SQL query and return records
- $result = mysql_query("SELECT * FROM Bans ");
- ?>
- <table border="2" style= "background-color: #84ed86; color: #761a9b; margin: 0 auto;" >
- <thead>
- <tr>
- <th>Number</th>
- <th>Banned</th>
- <th>Reason</th>
- <th>Banned By</th>
- <th>Time</th>
- </tr>
- </thead>
- <tbody>
- <?php
- while( $row = mysql_fetch_assoc( $result ) ){
- echo
- "<tr>
- <td>{$row\['Number'\]}</td>
- <td>{$row\['Banned'\]}</td>
- <td>{$row\['Reason'\]}</td>
- <td>{$row\['BannedBy'\]}</td>
- <td>{$row\['BanTime'\]}</td>
- </tr>\n";
- }
- ?>
- </tbody>
- </table>
- <?php mysql_close($connector); ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement