Advertisement
Guest User

Untitled

a guest
Aug 24th, 2019
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.28 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <?php include "./includes/header_info.php" ?>
  4. <body>
  5.  
  6. <!-- Hero section -->
  7. <section class="text-white tm-font-big tm-parallax">
  8. <?php include "./includes/navbar.php" ?>
  9. </section>
  10.  
  11. <!-- Select Race by id nummber -->
  12. <section id="introduction" class="tm-section-pad-top">
  13. <div class="container">
  14. <div class="row">
  15.  
  16. <form action="results.php">
  17. Enter Race ID <input type="text" name="id"><br>
  18. <input type="submit" value="Submit">
  19. </form>
  20.  
  21. <div class="col-lg-12">
  22. <table class="table" id="demo">
  23. <thead class="thead-dark">
  24. <tr>
  25. <th scope="col">Positie</th>
  26. <th scope="col">Driver</th>
  27. <th scope="col">Tijd</th>
  28. <th scope="col">Fastest Lap</th>
  29. <th scope="col">Punten</th>
  30. </tr>
  31. </thead>
  32. <?php
  33. $locaL_host = "localhost";
  34. $local_username = "root";
  35. $local_password = "mysql";
  36. $local_db = "f1_championship";
  37. $connect = mysql_connect($local_host, $local_username, $local_password);
  38. mysql_select_db($local_db);
  39.  
  40. $query = mysql_query(" SELECT race_id, driver, snelste_ronde, tijd, plek,(race_punten+snelste_ronde_punten-straf_punten)AS Punten
  41. FROM race_results
  42. WHERE race_id = 1
  43. ORDER BY Punten DESC ;");
  44.  
  45.  
  46. while($row = mysql_fetch_assoc($query)) {
  47. echo "<tr>
  48. <td>".$row["plek"]."</td>
  49. <td>".$row["driver"]."</td>
  50. <td>".$row["tijd"]."</td>
  51. <td>".$row["snelste_ronde"]."</td>
  52. <td>".$row["Punten"]."</td>
  53. <tr>";
  54. };
  55. ?>
  56. </table>
  57. </div>
  58. </div>
  59. </div>
  60. </br></br></br>
  61. </section>
  62.  
  63. </br></br></br></br>
  64.  
  65. <?php include "./includes/footer.php"?>
  66. <?php include "./includes/js_functions.php"?>
  67. <script>
  68.  
  69. </script>
  70. </body>
  71. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement