Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!doctype HTML>
- <head>
- <title>Soccer.db | The Ultimate Database for Soccer Stats, Info, & News</title>
- <link rel="stylesheet" href="football.css" />
- </head>
- <body>
- <?php
- $host = "localhost";
- $username = "root";
- $password = "root";
- $db = "soccer_db";
- $db_con = new mysqli($host, $username, $password, $db);
- if ($db_con->connect_errno) {
- echo "Failed to connecto to MySQL: (" . $db_con->connect_errno . ") " . $db_con->connect_error;
- }
- echo $db_con->host_info . "\n";
- $result = mysqli_query($db_con, "SELECT * FROM players");
- $db_con->close();
- ?>
- <div class="top-nav-wrapper">
- <div class="top-nav-content">
- <span>Soccer.db</span>
- </div>
- </div>
- <div class="long-ad-wrapper">
- <div class="long-ad-content">
- </div>
- </div>
- <?php
- echo "<table>";
- while($row = mysqli_fetch_array($result)){
- echo "<tr><td>" . $row['firstname'] . "</td><td>" . $row['lastname'] . "</td><td>" . $row['age'] . "</td></tr>";
- echo "</table>";
- }
- ?>
- </body>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement