====== Web Development Lesson 7 - Databases ====== ===== Exercises ===== ==== Objective ==== In this activity you'll use information extracted from a database to display player data in your project. ==== Setup ==== * Create a file called 'players.php' in your 'project' directory in Visual Studio Code. * Change the Language Mode to HTML in the bottom right corner. * Set up the page to include 'header.php', 'menu.php' and 'footer.php'. ==== Database ==== * Add code to connect to the database 'players'. * Set a variable called 'player' to 1. * Query the table 'players' for all fields. * Store all fields as variables. * Display the information as in LINK. Or create your own design. Here are some tips. * Set as flex with flex-direction: column. This creates a vertical flex box. * Set height of and to 100%. * Set flex: 5 for
, which ensures
is given 5 times more vertical space than the other elements. * Set
to flex display. * Set
to flex-wrap: wrap [[en:web_development:databases:summary|Next: Summary]]