Findet hier jemand den Fehler?
PHP
<!DOCTYPE html>
<html><head><title>Title</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<style>
body{
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}
</style>
<div style="width:100%;">
<?php
$db_link = mysqli_connect (
localhost,
Jakob,
efihowioe,
db
);
$sql = "SELECT * FROM tabelletest";
$db_erg = mysqli_query( $db_link, $sql );
if ( ! $db_erg )
{
die('Ungültige Abfrage: ' . mysqli_error());
}
echo '<div class="flex-container">';
while ($zeile = mysqli_fetch_assoc($db_erg))
{
echo "<div style="flex-grow: 8">". $zeile['email'] . "</div>";
echo "<div style="flex-grow: 2">". $zeile['preis'] . "</div>";
}
echo "</div>";
?>
<style>
.flex-container {
display: flex;
align-items: stretch;
background-color: #f1f1f1;
}
.flex-container > div {
background-color: DodgerBlue;
color: white;
width: 100px;
margin: 10px;
text-align: center;
line-height: 75px;
font-size: 30px;
}
</style>
</div>
</body></html>
Alles anzeigen