Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $servername = "localhost";
- $username = "root";
- $password = "root";
- $dbName = "test";
- //make a connection
- $connection = new mysqli($servername, $username, $password, $dbName);
- //Check the connection
- if(!$connection)
- {
- die("Connection Failed".mysqli_connect_error());
- }
- $sql = "SELECT userid, username, email, age, level, lastgame, gameswon, kills, deaths, winnings, password FROM users";
- $result = mysqli_query($connection, $sql);
- if(mysqli_num_rows($result)){
- while(mysqli_fetch_assoc($result)){
- echo "ID:" .$row['userid'] . "|Username" .$row['username'] . "|Email" .$row['email'] . "|Age" .$row['age'] . "|Level" .$row['level'] . "|LastGame" .$row['lastgame'] . "|GamesWon" .$row['gameswon'] . "|Kills" .$row['kills'] . "|Deaths" .$row['deaths'] . "|Winnings" .$row['winnings'] . "|Password" .$row['password'] .';';
- }
- }
- ?>
Add Comment
Please, Sign In to add comment