CSS PHP Forms with MySQL query

Use the following to ask for a value in a form and then query a database and display the results formated with CSS from a stylesheet.

Contents of lookup.php

  <title>PHP Test</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style type="text/css">
<?php include 'stylesheet.php'; ?>
<div class="container">
<img src="ageloc-me.jpg">
<div class="label">Enter code:</div>
// Check connection
if (mysqli_connect_errno())
echo "Failed to connect to MySQL: " . mysqli_connect_error();
$result = mysqli_query($con,"SELECT * FROM test");
while($row = mysqli_fetch_array($result))
echo "<tr>";
echo "<td>" . $row['code'] . "</td>";
echo "<td>" . $row['name'] . "</td>";
echo "<td>" . $row['age'] . "</td>";
echo "</tr>";
echo "</table>";

Contents of stylesheet.php

 table {
    border-collapse: collapse;
table, th, td {
    padding: 10px;
    border: 1px solid black;
.container {
    position: relative;
    text-align: center;
    color: white;
.bottom-left {
    position: absolute;
    bottom: 8px;
    left: 16px;
.label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);