Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- include('nav.inc.php');
- $dbservername = "localhost";
- $dbusername = "root";
- $dbpassword = "";
- $db = new PDO("mysql:host=$dbservername;dbname=football", $dbusername, $dbpassword);
- $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
- ?>
- <!DOCTYPE html>
- <html>
- <head>
- <title>Fußball</title>
- <link type="text/css" rel="stylesheet" href="style.css">
- </head>
- <body>
- <br>
- <h1 align="center">European Clubs</h1>
- <h3>Table of the best clubs in the world</h3>
- <h5>This table is sorted according to the fifa points of the clubs.</h5><br><br>
- <?php
- $sql2 ="SELECT id, name, leauge, points, image, imagepath from teams order by points desc";
- $stmt2 = $db->prepare($sql2);
- $stmt2->execute();
- echo'
- <table align="center" border="1">
- <tr class="rowhead" align="center" style="font-size:16px" bgcolor="#003399">
- <th width="70"></th>
- <th width="250">TEAMS</th>
- <th width="250">LEAGUE</th>
- <th width="90">POINTS</th>
- </tr>
- ';
- while($row = $stmt2->fetch()){
- echo'<tr><td bgcolor="#FFFFFF" align="center" height=50>';
- echo "<img src='images/".$row['image']."' height=35>";
- echo"</td>";
- echo'<td style="color:black;" bgcolor="#C6C6C6" align="center">';
- echo $row['name'];
- echo"</td>";
- echo'<td style="color:black;" bgcolor="#FFFFFF" align="center">';
- echo $row['leauge'];
- echo"</td>";
- echo'<td style="color:black;" bgcolor="#C6C6C6" align="center">';
- echo $row['points'];
- echo"</td></tr>";
- }
- echo"</table>";
- ?>
- <footer>
- <h2>Champions League in numbers</h2>
- <br>
- <table>
- <tr class="footerhead">
- <td width="300">Average goal per game</td>
- <td width="300">Goals</td>
- <td width="300">Completed games</td>
- <td width="300">Top goalscorer</td>
- </tr>
- <tr class="footercontent" height="50">
- <td style="font-size:25px"><b>2,94 </b><img src="images/fußball.jpeg" height="20"><img src="images/fußball.jpeg" height="20"><img src="images/fußball.jpeg" height="20"></td>
- <td style="font-size:25px"><b>364</b></td>
- <td style="font-size:25px"><b>124</b></td>
- <td style="font-size:25px">Lionel Messi</td>
- </tr>
- </table>
- </footer>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement