Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!-- START Highscores -->
- <div class="content_box info_box content_box_bottom_link" id="highscoreInfoBox">
- <h1>Highscore-List</h1>
- <div class="info_box_content">
- <p>
- </p>
- <p class="bold">
- Hier unsere Top 10 der besten Spieler: </p>
- <table border="0" class="rank">
- <thead>
- <tr>
- <th>
- <span class="first"></span> Rang </th>
- <th class="name">
- Benutzername </th>
- <th>
- Level </th>
- </tr>
- </thead>
- <tbody id="top10" name="top10">
- <?php
- $servername = "localhost";
- $username = "root";
- $password = "ZENSIERT";
- $dbname = "ZENSIERT";
- // Create connection
- $conn = new mysqli($servername, $username, $password, $dbname);
- // Check connection
- if ($conn->connect_error) {
- die("Connection failed: " . $conn->connect_error);
- }
- $sql = "SELECT name, level FROM characters order by level desc limit 0 , 10";
- $result = $conn->query($sql);
- if ($result->num_rows > 0) {
- $x = 0;
- // output data of each row
- while($row = $result->fetch_assoc()) {
- $x = $x + 1;
- echo "
- <tr>
- <td>".
- $x."
- </td>
- <td>".
- $row['name']."
- </td>
- <td>
- ".$row['level']."
- </td>
- </tr>
- ";
- }
- } else {
- }
- $conn->close();
- ?>
- </tbody>
- </table>
- <div id="selectServer">
- <label>
- Server:
- </label>
- <select onchange="callhighscore();" name="serverchoice" class="select_skin" id="serverchoice" onchange="submit();">
- <option value="1" selected="selected">
- <?php echo $server; ?> </option>
- </select>
- </div>
- </div>
- <a class="bottom_link" href="/main/highscore/">
- <span></span> Zu den Highscores </a>
- </div>
- <!-- ENDE Hightscores-->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement