Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en">
- <?php include "./includes/header_info.php" ?>
- <body>
- <!-- Hero section -->
- <section class="text-white tm-font-big tm-parallax">
- <?php include "./includes/navbar.php" ?>
- </section>
- <!-- Select Race by id nummber -->
- <section id="introduction" class="tm-section-pad-top">
- <div class="container">
- <div class="row">
- <form action="results.php">
- Enter Race ID <input type="text" name="id"><br>
- <input type="submit" value="Submit">
- </form>
- <div class="col-lg-12">
- <table class="table" id="demo">
- <thead class="thead-dark">
- <tr>
- <th scope="col">Positie</th>
- <th scope="col">Driver</th>
- <th scope="col">Tijd</th>
- <th scope="col">Fastest Lap</th>
- <th scope="col">Punten</th>
- </tr>
- </thead>
- <?php
- $locaL_host = "localhost";
- $local_username = "root";
- $local_password = "mysql";
- $local_db = "f1_championship";
- $connect = mysql_connect($local_host, $local_username, $local_password);
- mysql_select_db($local_db);
- $query = mysql_query(" SELECT race_id, driver, snelste_ronde, tijd, plek,(race_punten+snelste_ronde_punten-straf_punten)AS Punten
- FROM race_results
- WHERE race_id = 1
- ORDER BY Punten DESC ;");
- while($row = mysql_fetch_assoc($query)) {
- echo "<tr>
- <td>".$row["plek"]."</td>
- <td>".$row["driver"]."</td>
- <td>".$row["tijd"]."</td>
- <td>".$row["snelste_ronde"]."</td>
- <td>".$row["Punten"]."</td>
- <tr>";
- };
- ?>
- </table>
- </div>
- </div>
- </div>
- </br></br></br>
- </section>
- </br></br></br></br>
- <?php include "./includes/footer.php"?>
- <?php include "./includes/js_functions.php"?>
- <script>
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement