Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $servername = "localhost";
- $username = "rustopsc_root";
- $password = "sV@3g%3WmTrg";
- $dbname = "rustopsc_root";
- // Create connection
- $conn = new mysqli($servername, $username, $password, $dbname);
- // Check connection
- if ($conn->connect_error) {
- die("Connection failed: " . $conn->connect_error);
- }
- $sql = "SELECT id, purchaser, username, value, rank, time FROM transactions";
- $result = $conn->query($sql);
- if ($result->num_rows > 0) {
- echo "<table><tr><th>--------Purchaser--------</th><th>--------Value--------</th><th>--------SteamID 64--------</th><th>--------Date Purchased--------</th></tr>";
- // output data of each row
- while($row = $result->fetch_assoc()) {
- echo "<tr><td>".$row["purchaser"]."</td><td>".$row["username "]." ".$row["value"]."</td><td>".$row[""]." ".$row["username"]."</td><td>".$row[""]." ".$row["time"]."</td></tr>";
- }
- echo "</table>";
- } else {
- echo "0 results";
- }
- $conn->close();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement