Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <body>
- <?php
- $servername = "localhost";
- $username = "mifreecy_mercher";
- $password = "swag17";
- $dbname = "mifreecy_mercher";
- // Create connection
- $conn = new mysqli($servername, $username, $password, $dbname);
- // Check connection
- if ($conn->connect_error) {
- die("Connection failed: " . $conn->connect_error);
- echo "failed";
- }
- $result = mysql_query("SELECT playername, profit, runtime
- FROM connections");
- $to_encode = array();
- while($row = mysql_fetch_assoc($result)) {
- $to_encode[] = $row;
- }
- echo json_encode($to_encode);
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement